mirror of
https://github.com/nextcloud/android.git
synced 2024-11-25 22:55:46 +03:00
Merge pull request #12540 from nextcloud/bugfix/pop-sort-list-crash
BugFix Check emptiness of previousSortGroupState
This commit is contained in:
commit
dac1b46057
2 changed files with 12 additions and 2 deletions
|
@ -2486,7 +2486,12 @@ public class FileDisplayActivity extends FileActivity
|
|||
* visibility earlier using {@link #setSortListGroup(boolean, boolean)}
|
||||
*/
|
||||
private void popSortListGroupVisibility() {
|
||||
boolean popped = previousSortGroupState.pop();
|
||||
showSortListGroup(popped);
|
||||
showSortListGroup(false);
|
||||
|
||||
if (previousSortGroupState.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
previousSortGroupState.pop();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,6 +74,7 @@ import com.owncloud.android.lib.resources.shares.ShareeUser;
|
|||
import com.owncloud.android.operations.RefreshFolderOperation;
|
||||
import com.owncloud.android.operations.RemoteOperationFailedException;
|
||||
import com.owncloud.android.ui.activity.ComponentsGetter;
|
||||
import com.owncloud.android.ui.activity.FileDisplayActivity;
|
||||
import com.owncloud.android.ui.fragment.SearchType;
|
||||
import com.owncloud.android.ui.interfaces.OCFileListFragmentInterface;
|
||||
import com.owncloud.android.ui.preview.PreviewTextFragment;
|
||||
|
@ -160,6 +161,10 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
this.gridView = gridView;
|
||||
mStorageManager = transferServiceGetter.getStorageManager();
|
||||
|
||||
if (activity instanceof FileDisplayActivity) {
|
||||
((FileDisplayActivity) activity).showSortListGroup(true);
|
||||
}
|
||||
|
||||
if (mStorageManager == null) {
|
||||
mStorageManager = new FileDataStorageManager(user, activity.getContentResolver());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue