Bug 1822887 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

The calls to the following interactor functions do not need the collection of selected tabs, as these can be readily accessed via `TabsTrayState`. Refactor these interactor functions (and their respective controllers/implementors) to not need this parameter and rely on `TabsTrayState` instead.
```
Do exhaustive when (item) {
        is SelectionMenu.Item.BookmarkTabs -> {
            navInteractor.onSaveToBookmarks(store.state.mode.selectedTabs)
        }
        is SelectionMenu.Item.DeleteTabs -> {
            trayInteractor.onDeleteTabs(store.state.mode.selectedTabs)
        }
        is SelectionMenu.Item.MakeInactive -> {
            trayInteractor.onInactiveDebugClicked(store.state.mode.selectedTabs)
        }
}
```
The calls to the following interactor functions in do not need the collection of selected tabs, as these can be readily accessed via `TabsTrayState`. Refactor these interactor functions (and their respective controllers/implementors) to not need this parameter and rely on `TabsTrayState` instead.
```
Do exhaustive when (item) {
        is SelectionMenu.Item.BookmarkTabs -> {
            navInteractor.onSaveToBookmarks(store.state.mode.selectedTabs)
        }
        is SelectionMenu.Item.DeleteTabs -> {
            trayInteractor.onDeleteTabs(store.state.mode.selectedTabs)
        }
        is SelectionMenu.Item.MakeInactive -> {
            trayInteractor.onInactiveDebugClicked(store.state.mode.selectedTabs)
        }
}
```

For `SelectionBannerBinding.initListeners`, the calls to `navInteractor` and the action dispatch for exiting selection mode should be moved to the interactor/controller.
The calls to the following interactor functions do not need the collection of selected tabs, as these can be readily accessed via `TabsTrayState`. Refactor these interactor functions (and their respective controllers/implementors) to not need this parameter and rely on `TabsTrayState` instead.
```
Do exhaustive when (item) {
        is SelectionMenu.Item.BookmarkTabs -> {
            navInteractor.onSaveToBookmarks(store.state.mode.selectedTabs)
        }
        is SelectionMenu.Item.DeleteTabs -> {
            trayInteractor.onDeleteTabs(store.state.mode.selectedTabs)
        }
        is SelectionMenu.Item.MakeInactive -> {
            trayInteractor.onInactiveDebugClicked(store.state.mode.selectedTabs)
        }
}
```

For `SelectionBannerBinding.initListeners`, the calls to `navInteractor` and the action dispatch for exiting selection mode should be moved to the interactor/controller.
The calls to the following interactor functions do not need the collection of selected tabs, as these can be readily accessed via `TabsTrayState`. Refactor these interactor functions (and their respective controllers/implementors) to not need this parameter and rely on `TabsTrayState` instead.
```
Do exhaustive when (item) {
        is SelectionMenu.Item.BookmarkTabs -> {
            navInteractor.onSaveToBookmarks(store.state.mode.selectedTabs)
        }
        is SelectionMenu.Item.DeleteTabs -> {
            trayInteractor.onDeleteTabs(store.state.mode.selectedTabs)
        }
        is SelectionMenu.Item.MakeInactive -> {
            trayInteractor.onInactiveDebugClicked(store.state.mode.selectedTabs)
        }
}
```

For `SelectionBannerBinding.initListeners`, the calls to `navInteractor` and the action dispatch for exiting selection mode should be moved to the interactor/controller.

## Notes for QA:
This is a business logic refactor, so all existing functionality should be maintained with:
- Tabs tray multiselection save tabs as bookmarkss
- Tabs tray multiselection tab deletion
- Tabs tray multiselection force tabs as inactive
- Tabs tray multiselection save tabs to collections
- Tabs tray multiselection share tabs

Please validate that there have been no regressions with this functionality.

Back to Bug 1822887 Comment 0