Merge pull request #2648 from nextcloud/resumeDetailView

File detail view: store file/account when suspending fragments
This commit is contained in:
Andy Scherzinger 2018-06-05 16:39:26 +02:00 committed by GitHub
commit 0b2c986c0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View file

@ -336,4 +336,12 @@ public class FileDetailActivitiesFragment extends Fragment implements ActivityLi
public void onActivityClicked(RichObject richObject) { public void onActivityClicked(RichObject richObject) {
// TODO implement activity click // TODO implement activity click
} }
@Override
public void onSaveInstanceState(@NonNull Bundle outState) {
super.onSaveInstanceState(outState);
outState.putParcelable(FileActivity.EXTRA_FILE, file);
outState.putParcelable(FileActivity.EXTRA_ACCOUNT, account);
}
} }

View file

@ -459,4 +459,12 @@ public class FileDetailSharingFragment extends Fragment implements UserListAdapt
setShareByLinkInfo(false); setShareByLinkInfo(false);
} }
} }
@Override
public void onSaveInstanceState(@NonNull Bundle outState) {
super.onSaveInstanceState(outState);
outState.putParcelable(FileActivity.EXTRA_FILE, file);
outState.putParcelable(FileActivity.EXTRA_ACCOUNT, account);
}
} }