[fenix] For https://github.com/mozilla-mobile/fenix/issues/4126 - Handle all business...
commit23fec684336bb1463883d6b713f4a9bd3cd96254
authorMugurell <mugurell@users.noreply.github.com>
Wed, 16 Oct 2019 17:15:58 +0000 (16 20:15 +0300)
committerEmily Kager <emilykager@gmail.com>
Fri, 1 Nov 2019 00:08:40 +0000 (31 17:08 -0700)
treec6750a229a9c2e71b883f5cde5245a02e52e2c9e
parentb518f3457d06e1b3162016154b082c82d072941a
[fenix] For https://github.com/mozilla-mobile/fenix/issues/4126 - Handle all business logic with Interactors and a Controller

Combined all Stores into one for all Views shown in on Fragment.
Used a static `createStore()` which will build the initial state residing
inside the Store and not in the Fragment as to decouple the Fragment from the
business logic needed to build all the needed initial States.
Added Interactors that handle a MVI View's business logic for
TrackingProtectionView and WebsitePermissionsView.
WebsiteInfoView doesn't register any user input events and does not have any
reason to change while it is displayed so it does not have an Interactor.
The two Interactors will delegate Fragment's QuickSettingsController for
complex Android interactions, communication with other app features or for
Store updates.
Also refactored the stubs from the previous commit so that with this commit the
the quicksettings feature should all be working now based on lib-state.
13 files changed:
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/QuickSettingsController.kt [new file with mode: 0644]
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/QuickSettingsFragmentStore.kt [new file with mode: 0644]
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/QuickSettingsInteractor.kt [new file with mode: 0644]
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/QuickSettingsSheetDialogFragment.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/TrackingProtectionStore.kt [deleted file]
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/TrackingProtectionView.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/WebsiteInfoStore.kt [deleted file]
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/WebsiteInfoView.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/WebsitePermissionsStore.kt [deleted file]
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/WebsitePermissionsView.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/ext/PhoneFeatureExt.kt [new file with mode: 0644]
mobile/android/fenix/app/src/main/res/layout/fragment_quick_settings_dialog_sheet.xml
mobile/android/fenix/app/src/main/res/layout/quicksettings_permissions.xml