|
@@ -138,6 +138,7 @@ import androidx.fragment.app.Fragment;
|
|
import androidx.fragment.app.FragmentManager;
|
|
import androidx.fragment.app.FragmentManager;
|
|
import androidx.fragment.app.FragmentTransaction;
|
|
import androidx.fragment.app.FragmentTransaction;
|
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
|
|
|
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
|
|
|
|
|
import static com.owncloud.android.datamodel.OCFile.PATH_SEPARATOR;
|
|
import static com.owncloud.android.datamodel.OCFile.PATH_SEPARATOR;
|
|
|
|
|
|
@@ -620,7 +621,7 @@ public class FileDisplayActivity extends FileActivity
|
|
OCFileListFragment getListOfFilesFragment() {
|
|
OCFileListFragment getListOfFilesFragment() {
|
|
Fragment listOfFiles = getSupportFragmentManager().findFragmentByTag(
|
|
Fragment listOfFiles = getSupportFragmentManager().findFragmentByTag(
|
|
FileDisplayActivity.TAG_LIST_OF_FILES);
|
|
FileDisplayActivity.TAG_LIST_OF_FILES);
|
|
- if (listOfFiles != null) {
|
|
|
|
|
|
+ if (listOfFiles instanceof OCFileListFragment) {
|
|
return (OCFileListFragment) listOfFiles;
|
|
return (OCFileListFragment) listOfFiles;
|
|
}
|
|
}
|
|
Log_OC.e(TAG, "Access to unexisting list of files fragment!!");
|
|
Log_OC.e(TAG, "Access to unexisting list of files fragment!!");
|
|
@@ -1037,6 +1038,7 @@ public class FileDisplayActivity extends FileActivity
|
|
* 3. close FAB if open (only if drawer isn't open)
|
|
* 3. close FAB if open (only if drawer isn't open)
|
|
* 4. navigate up (only if drawer and FAB aren't open)
|
|
* 4. navigate up (only if drawer and FAB aren't open)
|
|
*/
|
|
*/
|
|
|
|
+ @SuppressFBWarnings("ITC_INHERITANCE_TYPE_CHECKING")
|
|
@Override
|
|
@Override
|
|
public void onBackPressed() {
|
|
public void onBackPressed() {
|
|
boolean isDrawerOpen = isDrawerOpen();
|
|
boolean isDrawerOpen = isDrawerOpen();
|
|
@@ -1077,6 +1079,8 @@ public class FileDisplayActivity extends FileActivity
|
|
showSortListGroup(true);
|
|
showSortListGroup(true);
|
|
cleanSecondFragment();
|
|
cleanSecondFragment();
|
|
}
|
|
}
|
|
|
|
+ } else if (leftFragment instanceof PreviewTextStringFragment) {
|
|
|
|
+ createMinFragments(null);
|
|
} else {
|
|
} else {
|
|
// pop back
|
|
// pop back
|
|
hideSearchView(getCurrentDir());
|
|
hideSearchView(getCurrentDir());
|