diff --git a/lib/configuration.dart b/lib/configuration.dart index 9b9b0065d12f6e6428847dabfdd5281c625abde5..d8a5458aa087022fa137c3dc84997041c81c3a86 100644 --- a/lib/configuration.dart +++ b/lib/configuration.dart @@ -83,7 +83,8 @@ class _MyHomePageState extends State<Configuration> { await configuration.storeToSharedPrefs(); debugPrint('Configuration stored!'); - + _status = 'Login success & configuration stored'; + setState(() {}); } on SocketException catch (e) { debugPrint('Exception: $e'); @@ -94,10 +95,6 @@ class _MyHomePageState extends State<Configuration> { _status = '$e'; setState(() {}); } - - _status = 'Success. Login valid, configuration stored'; - setState(() {}); - return; } Future<void> fetchInitData() async { @@ -278,6 +275,6 @@ class _MyHomePageState extends State<Configuration> { } //TODO: write configuration on app dispose! - +//TODO: display mission internet connection properly. //TODO: grey out update button if nothing has changed. ? \ No newline at end of file diff --git a/lib/viewevents.dart b/lib/viewevents.dart index 59fb2831c24183b02490f5ab0d6ad7ebf91b5d44..19dcc8e8d5c2b715e169b548f1fe805798cef7bd 100644 --- a/lib/viewevents.dart +++ b/lib/viewevents.dart @@ -23,11 +23,6 @@ class _ViewEvents extends State<ViewEvents> { localEvents = await database.getEvents(); int pendingEventCnt = await database.getPendingEventCnt(); - debugPrint("Database Events: "); - for (var event in localEvents){ - debugPrint(event.toString()); - } - _syncStatus = pendingEventCnt.toString() + ' event(s) pending'; setState(() {}); //Got events from database, so update UI } @@ -67,7 +62,7 @@ class _ViewEvents extends State<ViewEvents> { 'put success, remaining events: ' + syncCounter.toString()); event.status = 'EXPORTED'; //Update event to export only once database.updateEvent(event); //Update Event as exported in SQL Database - fetchEventsFromDb(); //update view list //TODO: this is bad for the sync performance! Consider working with localevent list for the UI! + fetchEventsFromDb(); //update view list //TODO: this is bad for the sync performance! setState(() {}); } else { throw Exception('Sync for ' + event.urn + 'failed');