Skip to content

Commit

Permalink
For #11404 - Create open all function
Browse files Browse the repository at this point in the history
- Create element to be displayed

- Update the interface and bind in the view holder
Set the filter to limit this action to FOLDER.

- Create core function
Main logic is done on the controller (has it should be done). The whole
process is done in one coroutine to be non-blocking as many
(sub)folders & links can be present. If folder is empty, a toast is
displayed. Else iterate on items. When item is:
- a FOLDER -> restart process (without toast) on the folder
- a ITEM -> open it
- a SEPARATOR -> do nothing
Once finished, show the tabs tray.

Toast message is defined in fragment to have access to context.

- Create androidTest for openAllInTabs
- Create tests for handleBookmarkFolderOpening
- Display 'open all' options only if folder has at least on child:
A coroutine and suspended functions have to be used, since `getTree`
is async.

X-Channel-Revision: [main] mozilla-mobile/android-components@f6e7218
X-Channel-Converted-Revision: [main] mozilla-mobile/fenix@9cf42cb
X-Channel-Revision: [main] mozilla-mobile/focus-android@7ca4851
  • Loading branch information
Taknok authored and rvandermeulen committed Sep 19, 2022
1 parent 7fd0e65 commit 0f6f9d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _meta/mozilla-mobile-fenix.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mozilla-mobile/fenix",
"revs": {
"main": "5e2fe2285c12ffecc55c3f81b97fd1335dd3bcb8"
"main": "9cf42cb7d91e49d693ad585fd95afb6efb621d91"
}
}
2 changes: 2 additions & 0 deletions mozilla-mobile/fenix/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,8 @@
<string name="bookmark_menu_open_in_new_tab_button">Open in new tab</string>
<!-- Bookmark overflow menu open in private tab button -->
<string name="bookmark_menu_open_in_private_tab_button">Open in private tab</string>
<!-- Bookmark overflow menu open all in tabs button -->
<string name="bookmark_menu_open_all_in_tabs_button">Open all in new tabs</string>
<!-- Bookmark overflow menu delete button -->
<string name="bookmark_menu_delete_button">Delete</string>
<!--Bookmark overflow menu save button -->
Expand Down

0 comments on commit 0f6f9d4

Please sign in to comment.