Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use "showTemporary" instead of explicitly hiding the notification
"OC.Notification.hide" expects the notification to be hidden to be
passed as an argument. As it was being used to show a temporary
notification the combination of "OC.Notification.show" and
"OC.Notification.hide" was replaced by a single call to
"OC.Notification.showTemporary".

The timeout could have been specified in the options of the call, but it
was left to the default value (7 seconds) for consistency with other
notifications.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
  • Loading branch information
danxuliu committed Apr 3, 2018
commit d003793e2a2014fd8a6d53d6c6a455ec9a8454b3
3 changes: 1 addition & 2 deletions js/vendor/nextcloud/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,7 @@
}).fail(function () {
$('#dropdown').find('.shareWithLoading').addClass('hidden');
$('#dropdown').find('.shareWithConfirm').removeClass('hidden');
OC.Notification.show(t('gallery', 'An error occurred. Please try again'));
window.setTimeout(OC.Notification.hide, 5000);
OC.Notification.showTemporary(t('gallery', 'An error occurred. Please try again'));
});
},
focus: function (event) {
Expand Down