Skip to content

Commit

Permalink
Vérif. accès internet avant recherche transferts
Browse files Browse the repository at this point in the history
  • Loading branch information
johan-perso committed Aug 20, 2024
1 parent cd75181 commit 8df1d6e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/pages/download.dart
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,13 @@ class _DownloadPageState extends State<DownloadPage> with AutomaticKeepAliveClie
return;
}

// Vérifier l'accès à internet
bool connectivity = await checkConnectivity();
if (!connectivity) {
debugPrint('cancelling updateExposedTransfers() because no internet connection');
return;
}

// Si toutes les méthodes d'exposition sont désactivées
if (exposeMethods['exposeMethods_ipinstance'] == false && exposeMethods['exposeMethods_nearby'] == false && exposeMethods['exposeAccountToken'].isEmpty) {
debugPrint('cancelling updateExposedTransfers() because all expose methods are disabled');
Expand Down

0 comments on commit 8df1d6e

Please sign in to comment.