mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
Fix crash
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
79aceb8990
commit
0b351d2e0e
2 changed files with 9 additions and 3 deletions
|
@ -780,9 +780,11 @@ public abstract class FileActivity extends DrawerActivity
|
|||
}
|
||||
|
||||
public void refreshList() {
|
||||
final Fragment fileListFragment = getSupportFragmentManager().findFragmentByTag(FileDisplayActivity.TAG_LIST_OF_FILES);
|
||||
if (fileListFragment != null) {
|
||||
((OCFileListFragment) fileListFragment).onRefresh();
|
||||
final Fragment fragment = getSupportFragmentManager().findFragmentByTag(FileDisplayActivity.TAG_LIST_OF_FILES);
|
||||
if (fragment instanceof OCFileListFragment listFragment) {
|
||||
listFragment.onRefresh();
|
||||
} else if (fragment instanceof FileDetailFragment detailFragment) {
|
||||
detailFragment.goBackToOCFileListFragment();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -195,6 +195,10 @@ public class FileDetailFragment extends FileFragment implements OnClickListener,
|
|||
return ((FileDetailTabAdapter) binding.pager.getAdapter()).getFileDetailActivitiesFragment();
|
||||
}
|
||||
|
||||
public void goBackToOCFileListFragment() {
|
||||
requireActivity().onBackPressed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
|
|
Loading…
Reference in a new issue