Skip to content

Commit

Permalink
Remove onAccountSet from FolderPickerActivity
Browse files Browse the repository at this point in the history
Move onAccountSet body to onStart.
Unconditionally reset fragment state, since the
acctount restoration flag is no longer available.

Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
  • Loading branch information
ezaquarii authored and tobiasKaminsky committed Oct 16, 2019
1 parent 3ef96f8 commit f580ae8
Showing 1 changed file with 6 additions and 16 deletions.
Expand Up @@ -32,6 +32,7 @@
import android.os.Bundle;
import android.os.Parcelable;
import android.util.Log;
import android.view.ActionMode;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
Expand Down Expand Up @@ -155,16 +156,8 @@ protected void onCreate(Bundle savedInstanceState) {
}

@Override
protected void onStart() {
super.onStart();
}

/**
* Called when the ownCloud {@link Account} associated to the Activity was just updated.
*/
@Override
protected void onAccountSet(boolean stateWasRecovered) {
super.onAccountSet(stateWasRecovered);
public void onActionModeStarted(ActionMode mode) {
super.onActionModeStarted(mode);
if (getAccount() != null) {

updateFileFromDB();
Expand All @@ -176,12 +169,9 @@ protected void onAccountSet(boolean stateWasRecovered) {
folder = getFile();
}

if (!stateWasRecovered) {
OCFileListFragment listOfFolders = getListOfFilesFragment();
listOfFolders.listDirectory(folder, false, false);

startSyncFolderOperation(folder, false);
}
OCFileListFragment listOfFolders = getListOfFilesFragment();
listOfFolders.listDirectory(folder, false, false);
startSyncFolderOperation(folder, false);

updateNavigationElementsInActionBar();
}
Expand Down

0 comments on commit f580ae8

Please sign in to comment.