Skip to content

Commit

Permalink
fix refresh e.g. single backup/restore task
Browse files Browse the repository at this point in the history
  • Loading branch information
hg42 authored and Tiefkuehlpizze committed Sep 26, 2020
1 parent 0679aaa commit 5c64843
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ public void resumeRefresh(List<String> checkedList) {
public void refresh(boolean mainBoolean, boolean backupOrAppSheetBoolean, List<String> checkedList) {
Log.d(MainActivityX.TAG, "refreshing");
runOnUiThread(() -> {
binding.refreshLayout.setRefreshing(true);
binding.refreshLayout.setRefreshing(true); //TODO: hg42 refresh can run in parallel, needs counting or multiple (overlaying?) Spinners
searchViewController.clean();
});
badgeCounter = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ private void setupOnClicks(AppSheet fragment) {
public void onActionCalled(BackupRestoreHelper.ActionType actionType, int mode) {
if (actionType == BackupRestoreHelper.ActionType.BACKUP) {
new BackupTask(this.app, handleMessages, requireMainActivity(), backupDir, MainActivityX.getShellHandlerInstance(), mode).execute();
requireMainActivity().refreshWithAppSheet();
//TODO: hg42: requireMainActivity().refreshWithAppSheet(); // too early...seems to prevent later refresh (check it! if so, why?)
} else if (actionType == BackupRestoreHelper.ActionType.RESTORE) {
// Latest Backup for now
BackupItem selectedBackup = this.app.getLatestBackup();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public void onPostExecute(Integer result) {
}
UIUtils.showActionResult(mainActivityX, this.result, null);
}
mainActivityX.refreshWithAppSheet();
if (signal != null) {
signal.countDown();
}
Expand Down

0 comments on commit 5c64843

Please sign in to comment.