Skip to content

Commit

Permalink
get rid of deprecate function, adjust name, displayName and icon
Browse files Browse the repository at this point in the history
  • Loading branch information
JanAckermann committed Apr 13, 2021
1 parent b0e3c09 commit 9405cb3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions js/galleryfileaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,16 @@
for (i = 0; i < mediaTypesLength; i++) {
// Each click handler gets the same function and images array and
// is responsible to load the slideshow
OCA.Files.fileActions.register(mediaTypes[i], 'View', OC.PERMISSION_READ, '',
galleryFileAction.onView);
OCA.Files.fileActions.setDefault(mediaTypes[i], 'View');
OCA.Files.fileActions.registerAction({
mime: mediaTypes[i],
name: 'Gallery',
permissions: OC.PERMISSION_READ,
icon: OC.imagePath('gallery', 'gallery-dark'),
actionHandler: galleryFileAction.onView,
displayName: t('gallery', 'Open in Gallery')
})
;
OCA.Files.fileActions.setDefault(mediaTypes[i], 'Gallery');
}
},

Expand Down

0 comments on commit 9405cb3

Please sign in to comment.