Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204670

Change subject: Correct error handling for hide/show admin actions
......................................................................

Correct error handling for hide/show admin actions

Bug: T96319
Change-Id: Ia167bc2b0c2ea2042e170809cd783dbb358f0e65
---
M resources/ext.gather.lists/init.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/70/204670/1

diff --git a/resources/ext.gather.lists/init.js 
b/resources/ext.gather.lists/init.js
index c92bab3..135f000 100644
--- a/resources/ext.gather.lists/init.js
+++ b/resources/ext.gather.lists/init.js
@@ -20,11 +20,11 @@
                        key = 'gather-lists-' + data.action + '-collection';
 
                if ( window.confirm( mw.msg( key, data.label, data.owner ) ) ) {
-                       api.setVisible( data.id, data.action === 'show' 
).always( function () {
+                       api.setVisible( data.id, data.action === 'show' ).done( 
function () {
                                $button.closest( 'li' ).remove();
                                key = 'gather-lists-' + data.action + 
'-success-toast';
                                toast.show( mw.msg( key, data.label ), 'toast' 
);
-                       }, function () {
+                       } ).fail( function () {
                                key = 'gather-lists-' + data.action + 
'-failure-toast';
                                toast.show( mw.msg( key, data.label ), 'toast 
fail' );
                        } );

-- 
To view, visit https://gerrit.wikimedia.org/r/204670
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia167bc2b0c2ea2042e170809cd783dbb358f0e65
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to