Skip to content

Commit

Permalink
Recreate activity after resseting settings to update language
Browse files Browse the repository at this point in the history
  • Loading branch information
grzesiek2010 committed Dec 21, 2017
1 parent eebcb6f commit 5d3d274
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,17 @@ private void handleResult(List<Integer> resetActions, List<Integer> failedResetA
}
}
if (!((AdminPreferencesActivity) getContext()).isInstanceStateSaved()) {
ResetSettingsResultDialog resetSettingsResultDialog = ResetSettingsResultDialog.newInstance(String.valueOf(resultMessage));
try {
resetSettingsResultDialog.show(((AdminPreferencesActivity) getContext()).getSupportFragmentManager(), RESET_SETTINGS_RESULT_DIALOG_TAG);
} catch (ClassCastException e) {
Timber.i(e);
}
((AdminPreferencesActivity) getContext()).runOnUiThread (new Thread(new Runnable() {
public void run() {
((AdminPreferencesActivity) getContext()).recreate();
ResetSettingsResultDialog resetSettingsResultDialog = ResetSettingsResultDialog.newInstance(String.valueOf(resultMessage));
try {
resetSettingsResultDialog.show(((AdminPreferencesActivity) getContext()).getSupportFragmentManager(), RESET_SETTINGS_RESULT_DIALOG_TAG);
} catch (ClassCastException e) {
Timber.i(e);
}
}
}));
}
}
}

0 comments on commit 5d3d274

Please sign in to comment.