Merge pull request #664 from ente-io/bug_fixes
Minor improvements and fixes
This commit is contained in:
commit
1417ceac5a
3 changed files with 15 additions and 5 deletions
|
@ -279,10 +279,14 @@ class RemoteSyncService {
|
|||
localIDsToSync.removeAll(alreadyClaimedLocalIDs);
|
||||
}
|
||||
|
||||
if (localIDsToSync.isEmpty || deviceCollection.collectionID == -1) {
|
||||
if (localIDsToSync.isEmpty) {
|
||||
continue;
|
||||
}
|
||||
await _createCollectionForDevicePath(deviceCollection);
|
||||
if (deviceCollection.collectionID == -1) {
|
||||
_logger.finest('DeviceCollection should not be -1 here');
|
||||
continue;
|
||||
}
|
||||
|
||||
moreFilesMarkedForBackup = true;
|
||||
await _db.setCollectionIDForUnMappedLocalFiles(
|
||||
|
|
|
@ -54,7 +54,13 @@ class UserService {
|
|||
emailValueNotifier =
|
||||
ValueNotifier<String>(Configuration.instance.getEmail());
|
||||
_preferences = await SharedPreferences.getInstance();
|
||||
setTwoFactor(fetchTwoFactorStatus: true).ignore();
|
||||
if (Configuration.instance.isLoggedIn()) {
|
||||
// add artificial delay in refreshing 2FA status
|
||||
Future.delayed(
|
||||
const Duration(seconds: 5),
|
||||
() => {setTwoFactor(fetchTwoFactorStatus: true).ignore()},
|
||||
);
|
||||
}
|
||||
Bus.instance.on<TwoFactorStatusChangeEvent>().listen((event) {
|
||||
setTwoFactor(value: event.status);
|
||||
});
|
||||
|
|
|
@ -26,7 +26,7 @@ class ToggleSwitchWidget extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _ToggleSwitchWidgetState extends State<ToggleSwitchWidget> {
|
||||
late bool toggleValue;
|
||||
bool? toggleValue;
|
||||
ExecutionState executionState = ExecutionState.idle;
|
||||
final _debouncer = Debouncer(const Duration(milliseconds: 300));
|
||||
|
||||
|
@ -60,7 +60,7 @@ class _ToggleSwitchWidgetState extends State<ToggleSwitchWidget> {
|
|||
activeColor: enteColorScheme.primary400,
|
||||
inactiveTrackColor: enteColorScheme.fillMuted,
|
||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
value: toggleValue,
|
||||
value: toggleValue ?? false,
|
||||
onChanged: (negationOfToggleValue) async {
|
||||
setState(() {
|
||||
toggleValue = negationOfToggleValue;
|
||||
|
@ -96,7 +96,7 @@ class _ToggleSwitchWidgetState extends State<ToggleSwitchWidget> {
|
|||
});
|
||||
}
|
||||
} else {
|
||||
toggleValue = !toggleValue;
|
||||
toggleValue = !toggleValue!;
|
||||
executionState = ExecutionState.idle;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue