From ee0d2bdf7ec237eaeef5c9953ce1f569f938ab95 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 10 Jul 2020 19:09:22 +0300 Subject: [PATCH] Use /refresh to load data --- lib/data/repositories/auth_repository.dart | 3 +-- lib/redux/app/app_actions.dart | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/data/repositories/auth_repository.dart b/lib/data/repositories/auth_repository.dart index 8ff003fd9..5d65b52ec 100644 --- a/lib/data/repositories/auth_repository.dart +++ b/lib/data/repositories/auth_repository.dart @@ -105,8 +105,7 @@ class AuthRepository { bool includeStatic = false; if (updatedAt > 0) { - // TODO enable this code - //url += '?updated_at=$updatedAt'; + url += '?updated_at=$updatedAt'; includeStatic = DateTime.now().millisecondsSinceEpoch - (updatedAt * 1000) > kMillisecondsToRefreshStaticData; diff --git a/lib/redux/app/app_actions.dart b/lib/redux/app/app_actions.dart index 89f0f62de..3dcb79daf 100644 --- a/lib/redux/app/app_actions.dart +++ b/lib/redux/app/app_actions.dart @@ -122,7 +122,7 @@ class UserPreferencesChanged implements PersistPrefs { final String accentColor; } -class LoadAccountSuccess { +class LoadAccountSuccess implements StopLoading { LoadAccountSuccess({ this.loginResponse, this.completer, @@ -144,7 +144,7 @@ class RefreshData implements StartLoading { class ClearData {} -class RefreshDataFailure { +class RefreshDataFailure implements StopLoading { const RefreshDataFailure(this.error); final dynamic error;