mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-10-19 22:17:43 +02:00
fix "test connection" to osm in simulate mode
This commit is contained in:
1 parent
4429663a03
commit
503556cac0
1 file changed
+4
@@ -434,7 +434,11 @@ class AppState extends ChangeNotifier {
|
||||
/// check. A conclusive result (blocked or not) means the credentials are
|
||||
/// valid; null means the connection/credentials failed. Also surfaces the
|
||||
/// [ActiveBlockDialog] if the user turns out to be blocked.
|
||||
///
|
||||
/// Simulate mode has no real account to check against, so there's nothing
|
||||
/// to test - it always reports success.
|
||||
Future<bool> testConnection(BuildContext context) async {
|
||||
if (uploadMode == UploadMode.simulate) return true;
|
||||
final result = await checkActiveBlock();
|
||||
if (result == true) {
|
||||
if (context.mounted) _showActiveBlockDialog(context);
|
||||
|
||||
Reference in new issue
Block a user