fix handling empty sessions

This commit is contained in:
Fabian Freund
2024-06-03 00:54:11 +02:00
parent 549385e630
commit 406db9c170
2 changed files with 8 additions and 4 deletions
@@ -29,7 +29,9 @@ class SettingsRepository extends _$SettingsRepository {
if (oldSettings.kagiSession != newSettings.kagiSession) {
await _flutterSecureStorage.write(
key: _sessionStorageKey,
value: newSettings.kagiSession,
value: (newSettings.kagiSession?.isNotEmpty ?? false)
? newSettings.kagiSession
: null,
);
}