Florianschmidtwelzow has uploaded a new change for review.
https://gerrit.wikimedia.org/r/179634
Change subject: Fix unneded Watched api call
......................................................................
Fix unneded Watched api call
Page doesn't have a isWatched method, added it to avoid unneeded api call
to get the watched status.
Bug: T78478
Change-Id: I1392a789095e1a94fc51c55a2cf2d37adbc6019c
---
M javascripts/Page.js
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/34/179634/1
diff --git a/javascripts/Page.js b/javascripts/Page.js
index 2a0e841..c554c60 100644
--- a/javascripts/Page.js
+++ b/javascripts/Page.js
@@ -77,6 +77,15 @@
},
/**
+ * Checks whether the current page is watched
+ * @method
+ * @return {Boolean}
+ */
+ isWatched: function () {
+ return this.options.isWatched;
+ }
+
+ /**
* Checks whether the given user can edit the page.
* @method
* @param {mw.user} user Object representing a user
--
To view, visit https://gerrit.wikimedia.org/r/179634
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1392a789095e1a94fc51c55a2cf2d37adbc6019c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits