|
@@ -44,6 +44,7 @@ import android.view.ViewGroup;
|
|
|
import android.widget.AbsListView;
|
|
|
import android.widget.PopupMenu;
|
|
|
|
|
|
+import com.google.android.material.appbar.AppBarLayout;
|
|
|
import com.google.android.material.behavior.HideBottomViewOnScrollBehavior;
|
|
|
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
|
|
import com.google.android.material.snackbar.Snackbar;
|
|
@@ -902,11 +903,13 @@ public class OCFileListFragment extends ExtendedListFragment implements
|
|
|
int position = mAdapter.getItemPosition(file);
|
|
|
|
|
|
if (file.isFolder()) {
|
|
|
+ resetHeaderScrollingState();
|
|
|
+
|
|
|
if (file.isEncrypted()) {
|
|
|
// check if API >= 19
|
|
|
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.KITKAT) {
|
|
|
Snackbar.make(getRecyclerView(), R.string.end_to_end_encryption_not_supported,
|
|
|
- Snackbar.LENGTH_LONG).show();
|
|
|
+ Snackbar.LENGTH_LONG).show();
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -1115,6 +1118,9 @@ public class OCFileListFragment extends ExtendedListFragment implements
|
|
|
if (mActiveActionMode != null) {
|
|
|
mActiveActionMode.finish();
|
|
|
}
|
|
|
+
|
|
|
+ resetHeaderScrollingState();
|
|
|
+
|
|
|
mContainerActivity.showDetails(singleFile);
|
|
|
setFabVisible(false);
|
|
|
mContainerActivity.showSortListGroup(false);
|
|
@@ -1851,4 +1857,12 @@ public class OCFileListFragment extends ExtendedListFragment implements
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ private void resetHeaderScrollingState() {
|
|
|
+ AppBarLayout appBarLayout = ((FileDisplayActivity) requireActivity()).findViewById(R.id.appbar);
|
|
|
+
|
|
|
+ if (appBarLayout != null) {
|
|
|
+ appBarLayout.setExpanded(true);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|