Remove unnecessary code

This commit is contained in:
Dennis Fokin 2024-12-09 17:39:58 +01:00
parent b5a13db8ad
commit a734cdeaae
No known key found for this signature in database
GPG Key ID: 870B88256690D8BC

View File

@ -132,11 +132,7 @@ Future<Widget> initialize(List<String> argv) async {
prefs = await SharedPreferences.getInstance();
} catch (error) {
// Attempt to repair the broken preferences file
Directory? appSupportDirectory = await getApplicationSupportDirectory();
var doesDirectoryExist = await appSupportDirectory.exists();
if (!doesDirectoryExist) {
throw const FormatException('Unable to find correct directory');
}
Directory appSupportDirectory = await getApplicationSupportDirectory();
String appDataPath =
path.join(appSupportDirectory.path, 'shared_preferences.json');
await _repairPreferences(appDataPath);