-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Feature #1756 : Bookmark System #1935
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
Feature #1756 : Bookmark System #1935
Conversation
…in/apps-android-commons into feature/1756_bookmark
When user come back from detail picture fragment, it solve the refresh bug.
…in/apps-android-commons into feature/1756_bookmark
…in/apps-android-commons into feature/1756_bookmark
Codecov Report
@@ Coverage Diff @@
## master #1935 +/- ##
=========================================
- Coverage 4.54% 4.36% -0.19%
=========================================
Files 199 211 +12
Lines 10113 10646 +533
Branches 900 951 +51
=========================================
+ Hits 460 465 +5
- Misses 9618 10146 +528
Partials 35 35
Continue to review full report at Codecov.
|
|
@R0ma1nG Thanks for the PR. I tried testing it and the app crashes as soon as I click on bookmarks. Here are the logs: Note: I didn't do a fresh install. If the user already has the app installed, you should handle it using sqlite migrations ie |
|
Great work @R0ma1nG!! I tested the feature on a fresh install and it works like a charm. I tried the following things:
Am happy to do a code review and merge this PR once the upgrade thing is fixed. :) |
|
Looks great! |
|
Hey @maskaravivek |
maskaravivek
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 @R0ma1nG! The code quality looks good and it is nice to see that you have added a lot of test cases.
I am happy to merge it once someone else also tests it. :)
| import fr.free.nrw.commons.auth.AuthenticatedActivity; | ||
| import fr.free.nrw.commons.media.MediaDetailPagerFragment; | ||
|
|
||
| public class BookmarksActivity extends AuthenticatedActivity |
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.
IMO this feature can be used without the user logging in. In that case, you don't need to extend AuthenticatedActivity
| Media m = provider.getMediaAtPosition(pager.getCurrentItem()); | ||
| switch (item.getItemId()) { | ||
| case R.id.menu_bookmark_current_image: | ||
| // TODO Update image state in database and in UI |
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.
Has this todo being taken care of?
Change from AuthenticatedActivity to BaseNavigationActivity
|
Wow, fantastic PR! Merging, thanks for the great job @Victor-Bonin and @R0ma1nG . :) |
Bookmark System
Fixes #1756
Creation of a new section Bookmarks in the navigation drawer, divided in 2 tabs.
Those tabs list the user's bookmarked media and places using the previsouly used display.
When clicking a media or a location you can access its details. From the details screen you can now save the picture or place, or unsave it if it is already bookmarked.
Creation of a new package : bookmarks including both subpackages locations and pictures
The subpackages have their own DAO, ContentProvider, Controller and Fragment.
Creation of corresponding tests.
Tests performed (required)
Tested on API level 24 (Samsung Galaxy S6) & 28 (Emulator Pixel 2), with betaDebug & betaRelease.
Screenshots :