Use /refresh to load data
This commit is contained in:
parent
3412008ba7
commit
ee0d2bdf7e
|
|
@ -105,8 +105,7 @@ class AuthRepository {
|
||||||
|
|
||||||
bool includeStatic = false;
|
bool includeStatic = false;
|
||||||
if (updatedAt > 0) {
|
if (updatedAt > 0) {
|
||||||
// TODO enable this code
|
url += '?updated_at=$updatedAt';
|
||||||
//url += '?updated_at=$updatedAt';
|
|
||||||
includeStatic =
|
includeStatic =
|
||||||
DateTime.now().millisecondsSinceEpoch - (updatedAt * 1000) >
|
DateTime.now().millisecondsSinceEpoch - (updatedAt * 1000) >
|
||||||
kMillisecondsToRefreshStaticData;
|
kMillisecondsToRefreshStaticData;
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ class UserPreferencesChanged implements PersistPrefs {
|
||||||
final String accentColor;
|
final String accentColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
class LoadAccountSuccess {
|
class LoadAccountSuccess implements StopLoading {
|
||||||
LoadAccountSuccess({
|
LoadAccountSuccess({
|
||||||
this.loginResponse,
|
this.loginResponse,
|
||||||
this.completer,
|
this.completer,
|
||||||
|
|
@ -144,7 +144,7 @@ class RefreshData implements StartLoading {
|
||||||
|
|
||||||
class ClearData {}
|
class ClearData {}
|
||||||
|
|
||||||
class RefreshDataFailure {
|
class RefreshDataFailure implements StopLoading {
|
||||||
const RefreshDataFailure(this.error);
|
const RefreshDataFailure(this.error);
|
||||||
|
|
||||||
final dynamic error;
|
final dynamic error;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue