Bug 1836447 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.

Currently there are two "extension" functions for `BookmarkNode` in fenix. [BookmarkNode](https://searchfox.org/mozilla-mobile/source/firefox-android/android-components/components/concept/storage/src/main/java/mozilla/components/concept/storage/BookmarksStorage.kt#132) is a AC class and we should add the functionality there. 
1. [minus](https://searchfox.org/mozilla-mobile/source/firefox-android/fenix/app/src/main/java/org/mozilla/fenix/ext/BookmarkNode.kt#17-20) is an extension function
2.  [getBookmarkCount](https://searchfox.org/mozilla-mobile/source/firefox-android/fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt#551-568) is a private function in `HomeActivity`. This can be simplified by moving both to `BookmarkNode` class. 

Also add tests for `getBookmarkCount`.
Currently there are two "extension" functions for `BookmarkNode` in fenix. [BookmarkNode](https://searchfox.org/mozilla-mobile/source/firefox-android/android-components/components/concept/storage/src/main/java/mozilla/components/concept/storage/BookmarksStorage.kt#132) is a AC class and we should add the functionality there. 
1. [minus](https://searchfox.org/mozilla-mobile/source/firefox-android/fenix/app/src/main/java/org/mozilla/fenix/ext/BookmarkNode.kt#17-20) is an extension function
2.  [getBookmarkCount](https://searchfox.org/mozilla-mobile/source/firefox-android/fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt#551-568) is a private function in `HomeActivity`. This can be simplified by moving both to `BookmarkNode` class. 

Also add tests for `getBookmarkCount`.

This will also reduce the size of `HomeActivity`, which should ideally only contain the glue code.

Back to Bug 1836447 Comment 0