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

Hide favourite icon in details view if favourite action is not available #7716

Conversation

danxuliu
Copy link
Member

@danxuliu danxuliu commented Jan 5, 2018

Fixes (in master) #4568

The problem was that the Favorite file action is added only to some of the file lists, but the icon in the details view was shown unconditionally for every file list, so when it was clicked and the Favorite action was tried to be triggered it was not found and the Download action was executed instead.

Now the favourite icon is hidden if its action is not available.

When the favourite icon in the details view is clicked the "Favorite"
action is triggered. However, if the action name given to
"triggerAction" is not found then the "Download" action is triggered
instead. As the "Favorite" action is not available in some file lists
(like "Recents") the "Download" action was executed instead in those
cases, which was a strange behaviour. Now the favourite icon is
hidden if its action is not available.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu added 3. to review Waiting for reviews backport-request bug feature: files papercut Annoying recurring issue with possibly simple fix. labels Jan 5, 2018
@codecov
Copy link

codecov bot commented Jan 5, 2018

Codecov Report

Merging #7716 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #7716      +/-   ##
============================================
+ Coverage     51.18%   51.18%   +<.01%     
  Complexity    24948    24948              
============================================
  Files          1605     1605              
  Lines         94923    94923              
  Branches       1376     1376              
============================================
+ Hits          48583    48584       +1     
+ Misses        46340    46339       -1
Impacted Files Coverage Δ Complexity Δ
lib/private/Server.php 81.43% <0%> (-0.12%) 134% <0%> (ø)
apps/files_trashbin/lib/Trashbin.php 72.53% <0%> (+0.24%) 136% <0%> (ø) ⬇️
lib/private/Security/CertificateManager.php 92.07% <0%> (+0.99%) 39% <0%> (ø) ⬇️

@MorrisJobke MorrisJobke added this to the Nextcloud 13 milestone Jan 5, 2018
Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@MorrisJobke MorrisJobke merged commit 9c3ac19 into master Jan 8, 2018
@MorrisJobke MorrisJobke deleted the hide-favourite-icon-in-details-view-if-favourite-action-is-not-available branch January 8, 2018 14:43
@MorrisJobke
Copy link
Member

#962074

@MorrisJobke
Copy link
Member

@danxuliu Could you open a backport against stable12?

@danxuliu
Copy link
Member Author

danxuliu commented Jan 8, 2018

@MorrisJobke Here you have: #7742

@MorrisJobke MorrisJobke mentioned this pull request Jan 9, 2018
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug feature: files papercut Annoying recurring issue with possibly simple fix.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants