From 0f6f9d49c246786a3d0068dea9f90a1e1e8a676d Mon Sep 17 00:00:00 2001 From: Pg Date: Thu, 7 Apr 2022 17:57:51 +0200 Subject: [PATCH] For #11404 - Create open all function - 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@f6e7218f668985ed6da2bfa920e10996b981588d X-Channel-Converted-Revision: [main] mozilla-mobile/fenix@9cf42cb7d91e49d693ad585fd95afb6efb621d91 X-Channel-Revision: [main] mozilla-mobile/focus-android@7ca4851307533a21256d33513e9c964020247df6 --- _meta/mozilla-mobile-fenix.json | 2 +- mozilla-mobile/fenix/app/src/main/res/values/strings.xml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/_meta/mozilla-mobile-fenix.json b/_meta/mozilla-mobile-fenix.json index e0f2d78ac84..01aa5efd274 100644 --- a/_meta/mozilla-mobile-fenix.json +++ b/_meta/mozilla-mobile-fenix.json @@ -1,6 +1,6 @@ { "name": "mozilla-mobile/fenix", "revs": { - "main": "5e2fe2285c12ffecc55c3f81b97fd1335dd3bcb8" + "main": "9cf42cb7d91e49d693ad585fd95afb6efb621d91" } } \ No newline at end of file diff --git a/mozilla-mobile/fenix/app/src/main/res/values/strings.xml b/mozilla-mobile/fenix/app/src/main/res/values/strings.xml index 0b94af097f7..37e32546da4 100644 --- a/mozilla-mobile/fenix/app/src/main/res/values/strings.xml +++ b/mozilla-mobile/fenix/app/src/main/res/values/strings.xml @@ -860,6 +860,8 @@ Open in new tab Open in private tab + + Open all in new tabs Delete