From dc03457397ecee828c3c5decef4580272cb318dd Mon Sep 17 00:00:00 2001 From: Adrian Baumgart Date: Sun, 31 Mar 2024 21:08:23 +0200 Subject: [PATCH] tiny code change --- lib/API/server_manager.dart | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/API/server_manager.dart b/lib/API/server_manager.dart index 624b2d2..83bbfe6 100644 --- a/lib/API/server_manager.dart +++ b/lib/API/server_manager.dart @@ -53,14 +53,13 @@ class ServerManager { final prefs = await SharedPreferences.getInstance(); if (prefs.getBool('first_run') ?? true) { - FlutterSecureStorage storage = const FlutterSecureStorage(); - await storage.deleteAll(); prefs.setBool('first_run', false); + } else { + serverUrl = await storage.read(key: "shlink_url"); + apiKey = await storage.read(key: "shlink_apikey"); } - serverUrl = await storage.read(key: "shlink_url"); - apiKey = await storage.read(key: "shlink_apikey"); } /// Saves the provided server credentials to [FlutterSecureStorage]