diff --git a/lib/events/sync_status_update_event.dart b/lib/events/sync_status_update_event.dart index 21204d4bf..e10fc9eab 100644 --- a/lib/events/sync_status_update_event.dart +++ b/lib/events/sync_status_update_event.dart @@ -24,8 +24,8 @@ class SyncStatusUpdate extends Event { } enum SyncStatus { - applying_local_diff, - applied_local_diff, + started_first_gallery_import, + completed_first_gallery_import, applying_remote_diff, preparing_for_upload, in_progress, diff --git a/lib/services/sync_service.dart b/lib/services/sync_service.dart index 885b6d6b6..0a7ed40ba 100644 --- a/lib/services/sync_service.dart +++ b/lib/services/sync_service.dart @@ -216,7 +216,7 @@ class SyncService { lastDBUpdationTime, syncStartTime, existingLocalFileIDs); } else { // Load from 0 - 01.01.2010 - Bus.instance.fire(SyncStatusUpdate(SyncStatus.applying_local_diff)); + Bus.instance.fire(SyncStatusUpdate(SyncStatus.started_first_gallery_import)); var startTime = 0; var toYear = 2010; var toTime = DateTime(toYear).microsecondsSinceEpoch; @@ -227,7 +227,7 @@ class SyncService { toTime = DateTime(toYear).microsecondsSinceEpoch; } await _loadAndStorePhotos(startTime, syncStartTime, existingLocalFileIDs); - Bus.instance.fire(SyncStatusUpdate(SyncStatus.applied_local_diff)); + Bus.instance.fire(SyncStatusUpdate(SyncStatus.completed_first_gallery_import)); } } diff --git a/lib/ui/settings_page.dart b/lib/ui/settings_page.dart index c97f9a052..ea5c0b714 100644 --- a/lib/ui/settings_page.dart +++ b/lib/ui/settings_page.dart @@ -45,7 +45,7 @@ class SettingsPage extends StatelessWidget { Widget _getBody() { final hasLoggedIn = Configuration.instance.getToken() != null; final List contents = []; - if (hasLoggedIn) { + if (!hasLoggedIn) { contents.addAll([ AccountSettingsWidget(), Padding(padding: EdgeInsets.all(12)), diff --git a/lib/ui/sync_indicator.dart b/lib/ui/sync_indicator.dart index aad10bb30..4f17f6d1a 100644 --- a/lib/ui/sync_indicator.dart +++ b/lib/ui/sync_indicator.dart @@ -46,7 +46,7 @@ class _SyncIndicatorState extends State { if (_event.status == SyncStatus.error) { return _getErrorWidget(); } - if (_event.status == SyncStatus.applied_local_diff || + if (_event.status == SyncStatus.completed_first_gallery_import || _event.status == SyncStatus.completed) { Future.delayed(Duration(milliseconds: 3000), () { if (mounted) { @@ -197,8 +197,8 @@ class _SyncIndicatorState extends State { } String _getRefreshingText() { - if (_event.status == SyncStatus.applying_local_diff || - _event.status == SyncStatus.applied_local_diff) { + if (_event.status == SyncStatus.started_first_gallery_import || + _event.status == SyncStatus.completed_first_gallery_import) { return "loading gallery..."; } if (_event.status == SyncStatus.applying_remote_diff) {