Skip to content
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

Added option to unfavourite image #1900

Merged
merged 4 commits into from Mar 4, 2018

Conversation

7 participants
@sridharjajoo
Copy link
Member

commented Feb 25, 2018

Fixed #1884

Changes: The user can unfavourite the images by long pressing on them and clicking the unfavourite option from the overflow menu.

Screenshots for the change:
un

@sridharjajoo sridharjajoo force-pushed the sridharjajoo:unfavouriteimage branch from 94eb87d to dbd45f6 Feb 25, 2018

@fossasia fossasia deleted a comment from codacy-bot Feb 25, 2018

@fossasia fossasia deleted a comment from codacy-bot Feb 25, 2018

@sridharjajoo sridharjajoo force-pushed the sridharjajoo:unfavouriteimage branch from dbd45f6 to a7354f6 Feb 25, 2018

@sridharjajoo sridharjajoo force-pushed the sridharjajoo:unfavouriteimage branch from 99c5e64 to 89c0bfa Feb 25, 2018

@sridharjajoo

This comment has been minimized.

Copy link
Member Author

commented Feb 25, 2018

@abishekvashok Kindly review!
Thanks!

menu.findItem(R.id.action_add_favourites).setVisible((visible || editMode) && (!albumsMode && !fav_photos));
menu.findItem(R.id.excludeAlbumButton).setVisible(editMode && !all_photos && albumsMode && !fav_photos);
menu.findItem(R.id.zipAlbumButton).setVisible(editMode && !all_photos && albumsMode && !fav_photos && !hidden &&
getAlbums().getSelectedCount() == 1);
menu.findItem(R.id.select_all).setVisible(editMode);
menu.findItem(R.id.delete_action).setVisible((!albumsMode || editMode) && (!all_photos || editMode) &&
(!fav_photos || editMode));

This comment has been minimized.

Copy link
@abishekvashok

abishekvashok Feb 26, 2018

Member

Why was this removed?

This comment has been minimized.

Copy link
@sridharjajoo

sridharjajoo Feb 26, 2018

Author Member

The delete icon was present in the favourites mode and its function was to unfavourite an image. But as its was a delete icon it was a bit confusing for the user what action will it perform . So i removed this line so that the toolbar will not have the delete icon and added the option to unfavourite image from overflow menu.

This comment has been minimized.

Copy link
@abishekvashok

abishekvashok Feb 27, 2018

Member

Maybe you could change it to an unfavourite button instead of a delete. But it would be used in other areas as well I guess.

This comment has been minimized.

Copy link
@sridharjajoo

sridharjajoo Feb 27, 2018

Author Member

So should I add the option to unfavourite an image to the toolbar or keep it in the overflow menu only?..I think to maintain consistency , it will be better if it is located in the overflow menu.

This comment has been minimized.

Copy link
@abishekvashok

abishekvashok Feb 27, 2018

Member

Nope. We will go with the same way then.

@yashLadha

This comment has been minimized.

Copy link
Member

commented Mar 3, 2018

I didn't get the idea of the image that is not favourite and showing the option of unfavourite in the menu. Instead of inflating a static menu, it should be according to the type of images the user has selected. @sridharjajoo . Views @abishekvashok @saurabhjn76 . Just as the snackbar is showing the number of images that are favourite only.

@sridharjajoo

This comment has been minimized.

Copy link
Member Author

commented Mar 3, 2018

When an individual image is selected which is not added to favourites , then the option to unfavourite it will not apper , only the option to favourite it will appear in the overflow menu. But when a group of images containing both already favourited images as well as non favourited images are selected then both the option to favourite and unfavourite it will appear.

@yashLadha

This comment has been minimized.

Copy link
Member

commented Mar 3, 2018

But still the idea is to show only when a number of favorite images are selected and not including any unfavorite image.

@sridharjajoo

This comment has been minimized.

Copy link
Member Author

commented Mar 3, 2018

@abishekvashok kindly merge this approved pr..thanks!

@abishekvashok

This comment has been minimized.

Copy link
Member

commented Mar 3, 2018

It would be much better the way @yashLadha suggested. But I think we can do this now and do it in another pr.

@fossasia fossasia deleted a comment from codacy-bot Mar 3, 2018

@codacy-bot

This comment has been minimized.

Copy link

commented Mar 4, 2018

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- app/src/main/java/org/fossasia/phimpme/gallery/activities/LFMainActivity.java  8
         

See the complete overview on Codacy

@fossasia fossasia deleted a comment from codacy-bot Mar 4, 2018

@isuruAb

isuruAb approved these changes Mar 4, 2018

@isuruAb isuruAb merged commit d603a5d into fossasia:development Mar 4, 2018

2 checks passed

Codacy/PR Quality Review Good work! A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

sauravvishal8797 added a commit to sauravvishal8797/phimpme-android that referenced this pull request Jun 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.