-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Implement favorites on Android #1236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Create entity - Create DAO
- bookmarks listed with section title
- Added logic to display empty hint in favorites adapter - Updated new UI elements to be displayed correctly and with expected copy
… favorites - be able to reuse dialog - be able to reuse command logic - be able to reuse same listeners - decouple from entity data objects from databases in UI
- if user moves the item, hide menu
# Conflicts: # app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt
|
|
||
| interface FavoritesRepository { | ||
| fun favoritesCountByDomain(domain: String): Int | ||
| fun favoritesObservable(): Single<List<SavedSite.Favorite>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't be favoritesSingle ?
malmstein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @cmonfortep, there is a lot of good stuff in here! As we discussed offline, there's a part regarding adding more RX code that we need to discuss internally. Other than that I've got a few suggestions that won't block the PR but I'd like you to consider.
| fun whenReturnBookmarkSuggestionsThenPhraseIsURLBaseHost() { | ||
| whenever(mockAutoCompleteService.autoComplete("title")).thenReturn(Observable.just(emptyList())) | ||
| whenever(mockBookmarksDao.bookmarksObservable()).thenReturn(Single.just(listOf(BookmarkEntity(0, "title", "https://example.com")))) | ||
| whenever(mockFavoritesRepository.favoritesObservable()).thenReturn(Single.just(emptyList())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed on MM, let's discuss with the rest of the team if we want to refactor AutoComplete API and get rid of Rx or not.
app/src/androidTest/java/com/duckduckgo/app/bookmarks/model/FavoritesDataRepositoryTest.kt
Outdated
Show resolved
Hide resolved
app/src/androidTest/java/com/duckduckgo/app/bookmarks/model/FavoritesDataRepositoryTest.kt
Outdated
Show resolved
Hide resolved
app/src/androidTest/java/com/duckduckgo/app/browser/favicon/DuckDuckGoFaviconManagerTest.kt
Outdated
Show resolved
Hide resolved
app/src/androidTest/java/com/duckduckgo/app/systemsearch/SystemSearchViewModelTest.kt
Show resolved
Hide resolved
# Conflicts: # app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt # app/src/main/res/layout/include_new_browser_tab.xml
# Conflicts: # app/schemas/com.duckduckgo.app.global.db.AppDatabase/34.json # app/src/androidTest/java/com/duckduckgo/app/browser/BrowserTabViewModelTest.kt # app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt # app/src/main/java/com/duckduckgo/app/global/db/AppDatabase.kt # app/src/main/res/values/string-untranslated.xml
Task/Issue URL: https://app.asana.com/0/488551667048375/1200182978612539/f
Tech Design URL:
CC:
Description:
This PR introduces favorites in the Android app.
List of new features:
Steps to test this PR:
Internal references:
Software Engineering Expectations
Technical Design Template