Phuedx has uploaded a new change for review.
https://gerrit.wikimedia.org/r/323522
Change subject: reducers: Remove unused state and cases
......................................................................
reducers: Remove unused state and cases
... from the preview reducer.
Change-Id: Ic7b9c38a39e0aec4f67a20b921acde2f9bbf362f
---
M resources/ext.popups/reducers.js
M tests/qunit/ext.popups/reducers.test.js
2 files changed, 3 insertions(+), 25 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups
refs/changes/22/323522/1
diff --git a/resources/ext.popups/reducers.js b/resources/ext.popups/reducers.js
index e4c11ad..395ad7e 100644
--- a/resources/ext.popups/reducers.js
+++ b/resources/ext.popups/reducers.js
@@ -44,9 +44,7 @@
linkInteractionToken: undefined,
activeLink: undefined,
activeEvent: undefined,
- interactionStarted: undefined,
- isDelayingFetch: false,
- isFetching: false
+ interactionStarted: undefined
};
}
@@ -62,7 +60,6 @@
activeLink: action.el,
activeEvent: action.event,
interactionStarted:
action.interactionStarted,
- isDelayingFetch: true,
linkInteractionToken:
action.linkInteractionToken
} );
case mw.popups.actionTypes.LINK_ABANDON:
@@ -70,29 +67,16 @@
activeLink: undefined,
activeEvent: undefined,
interactionStarted: undefined,
- isDelayingFetch: false,
linkInteractionToken: undefined,
fetchResponse: undefined
} );
- case mw.popups.actionTypes.LINK_CLICK:
- return nextState( state, {
- isDelayingFetch: false
- } );
case mw.popups.actionTypes.FETCH_START:
return nextState( state, {
- isDelayingFetch: false,
- isFetching: true,
fetchResponse: undefined
} );
case mw.popups.actionTypes.FETCH_END:
return nextState( state, {
- isFetching: false,
fetchResponse: action.result
- } );
- case mw.popups.actionTypes.FETCH_FAILED:
- return nextState( state, {
- isFetching: false,
- fetchResponse: action.response // To
catch error data if it exists
} );
default:
return state;
diff --git a/tests/qunit/ext.popups/reducers.test.js
b/tests/qunit/ext.popups/reducers.test.js
index a6d2145..4d2a590 100644
--- a/tests/qunit/ext.popups/reducers.test.js
+++ b/tests/qunit/ext.popups/reducers.test.js
@@ -17,9 +17,7 @@
linkInteractionToken: undefined,
activeLink: undefined,
activeEvent: undefined,
- interactionStarted: undefined,
- isDelayingFetch: false,
- isFetching: false
+ interactionStarted: undefined
},
renderer: {
isAnimating: false,
@@ -49,9 +47,7 @@
{
enabled: true,
sessionToken: '0123456789',
- pageToken: '9876543210',
- isDelayingFetch: false,
- isFetching: false
+ pageToken: '9876543210'
},
'It should set enabled and the session tokens on the
BOOT action'
);
@@ -70,8 +66,6 @@
{
activeLink: action.el,
activeEvent: action.event,
- isDelayingFetch: true,
- isFetching: false,
interactionStarted: action.interactionStarted,
linkInteractionToken:
action.linkInteractionToken
},
--
To view, visit https://gerrit.wikimedia.org/r/323522
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7b9c38a39e0aec4f67a20b921acde2f9bbf362f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: mpga
Gerrit-Owner: Phuedx <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits