mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-01-13 21:59:32 +00:00
chore: run dart format
Some checks are pending
Flutter CI & Release / Test (push) Waiting to run
Flutter CI & Release / Build Android APKs (push) Blocked by required conditions
Flutter CI & Release / build_linux (push) Blocked by required conditions
Flutter CI & Release / Create GitHub Release (push) Blocked by required conditions
Some checks are pending
Flutter CI & Release / Test (push) Waiting to run
Flutter CI & Release / Build Android APKs (push) Blocked by required conditions
Flutter CI & Release / build_linux (push) Blocked by required conditions
Flutter CI & Release / Create GitHub Release (push) Blocked by required conditions
This commit is contained in:
parent
a520136e01
commit
e23c0b6c5f
84 changed files with 1565 additions and 1945 deletions
|
|
@ -35,9 +35,7 @@ class AuthenticatedUsers extends _$AuthenticatedUsers {
|
|||
Set<model.AuthenticatedUser> readFromBoxOrCreate() {
|
||||
if (_box.isNotEmpty) {
|
||||
final foundData = _box.getRange(0, _box.length);
|
||||
_logger.fine(
|
||||
'found users in box: ${foundData.obfuscate()}',
|
||||
);
|
||||
_logger.fine('found users in box: ${foundData.obfuscate()}');
|
||||
return foundData.toSet();
|
||||
} else {
|
||||
_logger.fine('no settings found in box');
|
||||
|
|
@ -59,11 +57,9 @@ class AuthenticatedUsers extends _$AuthenticatedUsers {
|
|||
ref.invalidateSelf();
|
||||
if (setActive) {
|
||||
final apiSettings = ref.read(apiSettingsProvider);
|
||||
ref.read(apiSettingsProvider.notifier).updateState(
|
||||
apiSettings.copyWith(
|
||||
activeUser: user,
|
||||
),
|
||||
);
|
||||
ref
|
||||
.read(apiSettingsProvider.notifier)
|
||||
.updateState(apiSettings.copyWith(activeUser: user));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -86,11 +82,9 @@ class AuthenticatedUsers extends _$AuthenticatedUsers {
|
|||
// replace the active user with the first user in the list
|
||||
// or null if there are no users left
|
||||
final newActiveUser = state.isNotEmpty ? state.first : null;
|
||||
ref.read(apiSettingsProvider.notifier).updateState(
|
||||
apiSettings.copyWith(
|
||||
activeUser: newActiveUser,
|
||||
),
|
||||
);
|
||||
ref
|
||||
.read(apiSettingsProvider.notifier)
|
||||
.updateState(apiSettings.copyWith(activeUser: newActiveUser));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue