Skip to content

Feat: "Add to Home screen" option to create folder shortcuts with deep link - #219

Open
Lightz2002 wants to merge 1 commit into
opencloud-eu:mainfrom
Lightz2002:main
Open

Feat: "Add to Home screen" option to create folder shortcuts with deep link#219
Lightz2002 wants to merge 1 commit into
opencloud-eu:mainfrom
Lightz2002:main

Conversation

@Lightz2002

Copy link
Copy Markdown
  • Adds an "Add to Home screen" action for folders that pins a launcher shortcut,
    deep-linking straight into that folder when tapped.

Changes

  • Add ADD_TO_HOME_SCREEN to FileMenuOption and wire it into the file actions menu
    (action_add_to_home) with a new icon; only shown for single-selected folders via
    FilterFileMenuOptionsUseCase
  • New AddToHomeScreenDialogFragment: pre-filled, editable shortcut name with validation
    (empty name, max filename length, forbidden characters)
  • New FolderShortcutHelper: creates a pinned shortcut via ShortcutManager (API 26+),
    embedding the folder's remote ID, remote path, and space ID in the intent
  • FileDisplayActivity handles the new OPEN_SHORTCUT action: resolves the folder by
    remote path + space ID from local storage and navigates directly into it; extras are
    consumed after handling; shows an error snackbar if the folder no longer exists locally

Notes

  • Devices below API 26 show a toast instead of creating a shortcut
  • Shortcut opens in All Files view regardless of the last used file list option

Testing

  • Long-press/overflow menu on a folder → "Add to Home screen" → confirm → pin the shortcut
  • Tap the shortcut → app opens directly inside the target folder
  • Rename the shortcut in the dialog; verify empty names / forbidden chars are rejected
  • Delete the folder, then tap the shortcut → error message shown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant