mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 07:05:49 +03:00
add filterActionsForOfflineOperations
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
4ab29f0cd3
commit
570984adf0
2 changed files with 18 additions and 1 deletions
|
@ -157,6 +157,7 @@ public class OCFileListBottomSheetDialog extends BottomSheetDialog implements In
|
|||
}
|
||||
|
||||
setupClickListener();
|
||||
filterActionsForOfflineOperations();
|
||||
}
|
||||
|
||||
private void setupClickListener() {
|
||||
|
@ -210,6 +211,22 @@ public class OCFileListBottomSheetDialog extends BottomSheetDialog implements In
|
|||
});
|
||||
}
|
||||
|
||||
private void filterActionsForOfflineOperations() {
|
||||
if (!file.isOfflineOperation()) {
|
||||
return;
|
||||
}
|
||||
|
||||
binding.menuCreateRichWorkspace.setVisibility(View.GONE);
|
||||
binding.menuUploadFromApp.setVisibility(View.GONE);
|
||||
binding.menuDirectCameraUpload.setVisibility(View.GONE);
|
||||
binding.menuScanDocUpload.setVisibility(View.GONE);
|
||||
binding.menuUploadFiles.setVisibility(View.GONE);
|
||||
binding.menuNewDocument.setVisibility(View.GONE);
|
||||
binding.menuNewSpreadsheet.setVisibility(View.GONE);
|
||||
binding.menuNewPresentation.setVisibility(View.GONE);
|
||||
binding.creatorsContainer.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
|
|
|
@ -1478,7 +1478,7 @@ public class OCFileListFragment extends ExtendedListFragment implements
|
|||
}
|
||||
|
||||
// FAB
|
||||
setFabEnabled(mFile != null && mFile.canWrite());
|
||||
setFabEnabled(mFile != null && (mFile.canWrite() || mFile.isOfflineOperation()));
|
||||
|
||||
invalidateActionMode();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue