From 8df1d6ec04095911af216e4651519302dad9c2ec Mon Sep 17 00:00:00 2001 From: Johan le stickman Date: Tue, 20 Aug 2024 23:51:26 +0200 Subject: [PATCH] =?UTF-8?q?V=C3=A9rif.=20acc=C3=A8s=20internet=20avant=20r?= =?UTF-8?q?echerche=20transferts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/download.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/pages/download.dart b/lib/pages/download.dart index 6cab319..2525e23 100644 --- a/lib/pages/download.dart +++ b/lib/pages/download.dart @@ -198,6 +198,13 @@ class _DownloadPageState extends State 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');