properly reset header for preview fragments

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2020-07-28 23:18:29 +02:00
parent ddd7b901da
commit e7cd9ce6bc
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -1001,10 +1001,13 @@ public class OCFileListFragment extends ExtendedListFragment implements
((FileDisplayActivity) mContainerActivity).startContactListFragment(file);
} else if (PreviewTextFileFragment.canBePreviewed(file)) {
setFabVisible(false);
resetHeaderScrollingState();
((FileDisplayActivity) mContainerActivity).startTextPreview(file, false);
} else if (file.isDown()) {
if (PreviewMediaFragment.canBePreviewed(file)) {
// media preview
setFabVisible(false);
resetHeaderScrollingState();
((FileDisplayActivity) mContainerActivity).startMediaPreview(file, 0, true, true, false);
} else {
mContainerActivity.getFileOperationsHelper().openFile(file);
@ -1018,6 +1021,8 @@ public class OCFileListFragment extends ExtendedListFragment implements
if (PreviewMediaFragment.canBePreviewed(file) && account.getServer().getVersion()
.isMediaStreamingSupported() && !file.isEncrypted()) {
// stream media preview on >= NC14
setFabVisible(false);
resetHeaderScrollingState();
((FileDisplayActivity) mContainerActivity).startMediaPreview(file, 0, true, true, true);
} else if (FileMenuFilter.isEditorAvailable(requireContext().getContentResolver(),
accountManager.getUser(),