Skip to content

Commit

Permalink
Fix listDirectory call
Browse files Browse the repository at this point in the history
  • Loading branch information
alperozturk96 committed Aug 28, 2024
1 parent b1486bb commit e90c545
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1607,10 +1607,14 @@ private void observeWorkerState() {
}

public void refreshCurrentDirectory() {
Fragment lastFragment = ActivityExtensionsKt.lastFragment(this);
if (lastFragment instanceof OCFileListFragment fragment) {
OCFile currentDir = (getCurrentDir() == null) ? null : getStorageManager().getFileByDecryptedRemotePath(getCurrentDir().getRemotePath());
fragment.listDirectory(currentDir,false, false);
OCFile currentDir = (getCurrentDir() != null) ?
getStorageManager().getFileByDecryptedRemotePath(getCurrentDir().getRemotePath()) : null;

OCFileListFragment fileListFragment =
(ActivityExtensionsKt.lastFragment(this) instanceof OCFileListFragment fragment) ? fragment : getListOfFilesFragment();

if (fileListFragment != null) {
fileListFragment.listDirectory(currentDir, false, false);
}
}

Expand Down

0 comments on commit e90c545

Please sign in to comment.