Refactor
This commit is contained in:
parent
31c89cefbf
commit
eca501da7d
|
|
@ -466,7 +466,7 @@ Middleware<AppState> _createAccountLoaded() {
|
||||||
|
|
||||||
next(action);
|
next(action);
|
||||||
|
|
||||||
WidgetUtils.updateWidgetData();
|
WidgetUtils.updateData();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -521,7 +521,7 @@ Middleware<AppState> _createDataRefreshed() {
|
||||||
|
|
||||||
next(action);
|
next(action);
|
||||||
|
|
||||||
WidgetUtils.updateWidgetData();
|
WidgetUtils.updateData();
|
||||||
|
|
||||||
if (store.state.company.isLarge && !store.state.isLoaded) {
|
if (store.state.company.isLarge && !store.state.isLoaded) {
|
||||||
store.dispatch(LoadClients());
|
store.dispatch(LoadClients());
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ Middleware<AppState> _saveCompany(SettingsRepository settingsRepository) {
|
||||||
.then((company) {
|
.then((company) {
|
||||||
store.dispatch(SaveCompanySuccess(company));
|
store.dispatch(SaveCompanySuccess(company));
|
||||||
action.completer.complete();
|
action.completer.complete();
|
||||||
WidgetUtils.updateWidgetData();
|
WidgetUtils.updateData();
|
||||||
}).catchError((Object error) {
|
}).catchError((Object error) {
|
||||||
print(error);
|
print(error);
|
||||||
store.dispatch(SaveCompanyFailure(error));
|
store.dispatch(SaveCompanyFailure(error));
|
||||||
|
|
@ -152,7 +152,7 @@ Middleware<AppState> _saveAuthUser(SettingsRepository settingsRepository) {
|
||||||
if (action.completer != null) {
|
if (action.completer != null) {
|
||||||
action.completer.complete();
|
action.completer.complete();
|
||||||
}
|
}
|
||||||
WidgetUtils.updateWidgetData();
|
WidgetUtils.updateData();
|
||||||
}).catchError((Object error) {
|
}).catchError((Object error) {
|
||||||
print(error);
|
print(error);
|
||||||
store.dispatch(SaveAuthUserFailure(error));
|
store.dispatch(SaveAuthUserFailure(error));
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ class WidgetUtils {
|
||||||
static const DATA_KEY = 'widget_data';
|
static const DATA_KEY = 'widget_data';
|
||||||
static const APP_GROUP = 'group.com.invoiceninja.app';
|
static const APP_GROUP = 'group.com.invoiceninja.app';
|
||||||
|
|
||||||
static void updateWidgetData() {
|
static void updateData() {
|
||||||
if (!isApple()) {
|
if (!isApple()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue