Show only offline-available actions when offline in the "create new" menu - #17604
Open
daniele-verducci wants to merge 2 commits into
Open
Show only offline-available actions when offline in the "create new" menu#17604daniele-verducci wants to merge 2 commits into
daniele-verducci wants to merge 2 commits into
Conversation
Contributor
Author
|
/backport to stable-35.0.x |
|
APK file: https://github.com/nextcloud/android/actions/runs/34465424570/artifacts/10149165149 |
|
APK file: https://github.com/nextcloud/android/actions/runs/34486697039/artifacts/10156868420 |
…ions between root and subfolders Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
alperozturk96
force-pushed
the
internal-104930
branch
from
September 11, 2026 07:19
c2d7ba3 to
6a40788
Compare
|
blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed. |
alperozturk96
requested changes
Sep 11, 2026
| @@ -419,18 +419,14 @@ class OCFileListBottomSheetDialog( | |||
| } | |||
|
|
|||
| private fun filterActionsForOfflineOperations() { | |||
Collaborator
There was a problem hiding this comment.
We can use suspend functions.
private fun filterActionsForOfflineOperations() {
lifecycleScope.launch {
val available = fileActivity.connectivityService.isNetworkAndServerAvailableSuspended()
if (available && (!file.isOfflineOperation || file.isRootDirectory)) {
return@launch
}
hideCreationOptions()
}
}
private suspend fun hideCreationOptions() = withContext(Dispatchers.Main) {
binding.run {
menuCreateRichWorkspace.visibility = View.GONE
creatorsOverviewContainer.visibility = View.GONE
menuEncryptedMkdir.visibility = View.GONE
}
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: when the app was offline the bottom sheet was showing all actions for the root directory (also the ones that aren't available offline, like document creators and encrypted folders) and hiding some actions that works also offline for the subdirectories (like scanning a document or uploading from other apps).
This PR makes only offline-available actions visible when offline, and now shown actions matches between root and subfolders.
🖼️ Screenshots
🏁 Checklist
/backport to stable-xx.x🤖 AI (if applicable)