[fenix] Closes https://github.com/mozilla-mobile/fenix/issues/4396 - Add a Bookmarks...
commit2986bf3a45098bdf3bea6b914ec75ba940692de9
authorMugurell <Mugurell@users.noreply.github.com>
Mon, 19 Aug 2019 15:34:57 +0000 (19 18:34 +0300)
committerSawyer Blatz <sdblatz@gmail.com>
Mon, 19 Aug 2019 15:34:57 +0000 (19 08:34 -0700)
tree8fbd06528000134ef2d74f78096a30f7662419f9
parent69fecb16f4217d203981678cb1748190a6bf4c88
[fenix] Closes https://github.com/mozilla-mobile/fenix/issues/4396 - Add a Bookmarks Controller (https://github.com/mozilla-mobile/fenix/pull/4593)

* For https://github.com/mozilla-mobile/fenix/issues/4396 - Rename BookmarkInteractor methods

Following the naming model used in other Interactors this too will use reactive
method names in the form of "on..." instead of the previous imperative model.

Kept the imperative naming model for the methods from `SelectionInteractor` as
they are a new addition and I'm not sure about the future direction.

* For https://github.com/mozilla-mobile/fenix/issues/4396 - Add a BookmarkController

It abstracts the Fragment behavior in a contract through which various
Interactors can inform about the specific View changes and can ask for
modifications in their container Fragment.

This contract and it's implementation - `DefaultBookmarkController` are the
result of extracting the container Fragment's business logic from
`BookmarkFragmentInteractor` in it's own standalone component.

* For https://github.com/mozilla-mobile/fenix/issues/4396 - Refactored Bookmark related tests

Added a new `BookmarkControllerTest` tests class which complements the new
`BookmarkController` to ensure that it properly operates on `BookmarkFragment`

Also refactored the existing `BookmarkFragmentInteractorTest` to accommodate
`BookmarkFragmentInteractor`'s now more specialized behavior.
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkController.kt [new file with mode: 0644]
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragmentInteractor.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkView.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/SignInView.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/selectfolder/SelectBookmarkFolderFragment.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/selectfolder/SelectBookmarkFolderInteractor.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/viewholders/BookmarkNodeViewHolder.kt
mobile/android/fenix/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkControllerTest.kt [new file with mode: 0644]
mobile/android/fenix/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkFragmentInteractorTest.kt