feat(deeplinking): Pass state to openDesktopApp.
This commit is contained in:
parent
09cc738219
commit
651791b8df
|
@ -75,7 +75,7 @@ export function getDeepLinkingPage(state) {
|
|||
return Promise.resolve();
|
||||
}
|
||||
|
||||
return _openDesktopApp().then(
|
||||
return _openDesktopApp(state).then(
|
||||
// eslint-disable-next-line no-confusing-arrow
|
||||
result => result ? DeepLinkingDesktopPage : undefined);
|
||||
}
|
||||
|
@ -83,9 +83,10 @@ export function getDeepLinkingPage(state) {
|
|||
/**
|
||||
* Opens the desktop app.
|
||||
*
|
||||
* @param {Object} state - Object containing current redux state.
|
||||
* @returns {Promise<boolean>} - Resolves with true if the attempt to open the desktop app was successful and resolves
|
||||
* with false otherwise.
|
||||
*/
|
||||
export function openDesktopApp() {
|
||||
return _openDesktopApp();
|
||||
export function openDesktopApp(state) {
|
||||
return _openDesktopApp(state);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ import { openDesktopApp } from './functions';
|
|||
MiddlewareRegistry.register(store => next => action => {
|
||||
switch (action.type) {
|
||||
case OPEN_DESKTOP_APP:
|
||||
openDesktopApp();
|
||||
openDesktopApp(store.getState());
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
// @flow
|
||||
|
||||
/**
|
||||
* Opens the desktop app.
|
||||
*
|
||||
* @param {Object} state - Object containing current redux state.
|
||||
* @returns {Promise<boolean>} - Resolves with true if the attempt to open the desktop app was successful and resolves
|
||||
* with false otherwise.
|
||||
*/
|
||||
export function _openDesktopApp() {
|
||||
export function _openDesktopApp(state: Object) { // eslint-disable-line no-unused-vars
|
||||
return Promise.resolve(false);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue