Merge pull request #84 from lbryio/stop-install-new
allow preventing lbryinc calls on authenticate
This commit is contained in:
commit
275f35b31e
3 changed files with 20 additions and 11 deletions
11
dist/bundle.es.js
vendored
11
dist/bundle.es.js
vendored
|
@ -1296,7 +1296,7 @@ function doInstallNew(appVersion, os = null, firebaseToken = null) {
|
||||||
});
|
});
|
||||||
} // TODO: Call doInstallNew separately so we don't have to pass appVersion and os_system params?
|
} // TODO: Call doInstallNew separately so we don't have to pass appVersion and os_system params?
|
||||||
|
|
||||||
function doAuthenticate(appVersion, os = null, firebaseToken = null) {
|
function doAuthenticate(appVersion, os = null, firebaseToken = null, shareUsageData = true) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: AUTHENTICATION_STARTED
|
type: AUTHENTICATION_STARTED
|
||||||
|
@ -1310,9 +1310,12 @@ function doAuthenticate(appVersion, os = null, firebaseToken = null) {
|
||||||
accessToken: token
|
accessToken: token
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
dispatch(doRewardList());
|
|
||||||
dispatch(doFetchInviteStatus());
|
if (shareUsageData) {
|
||||||
doInstallNew(appVersion, os, firebaseToken);
|
dispatch(doRewardList());
|
||||||
|
dispatch(doFetchInviteStatus());
|
||||||
|
doInstallNew(appVersion, os, firebaseToken);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
dispatch({
|
dispatch({
|
||||||
|
|
10
dist/bundle.js
vendored
10
dist/bundle.js
vendored
|
@ -4927,6 +4927,7 @@ function doInstallNew(appVersion) {
|
||||||
function doAuthenticate(appVersion) {
|
function doAuthenticate(appVersion) {
|
||||||
var os = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
var os = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
||||||
var firebaseToken = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
var firebaseToken = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
||||||
|
var shareUsageData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
||||||
return function (dispatch) {
|
return function (dispatch) {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["AUTHENTICATION_STARTED"]
|
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["AUTHENTICATION_STARTED"]
|
||||||
|
@ -4940,9 +4941,12 @@ function doAuthenticate(appVersion) {
|
||||||
accessToken: token
|
accessToken: token
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
dispatch(Object(redux_actions_rewards__WEBPACK_IMPORTED_MODULE_2__["doRewardList"])());
|
|
||||||
dispatch(doFetchInviteStatus());
|
if (shareUsageData) {
|
||||||
doInstallNew(appVersion, os, firebaseToken);
|
dispatch(Object(redux_actions_rewards__WEBPACK_IMPORTED_MODULE_2__["doRewardList"])());
|
||||||
|
dispatch(doFetchInviteStatus());
|
||||||
|
doInstallNew(appVersion, os, firebaseToken);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
})["catch"](function (error) {
|
})["catch"](function (error) {
|
||||||
dispatch({
|
dispatch({
|
||||||
|
|
|
@ -64,7 +64,7 @@ export function doInstallNew(appVersion, os = null, firebaseToken = null) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Call doInstallNew separately so we don't have to pass appVersion and os_system params?
|
// TODO: Call doInstallNew separately so we don't have to pass appVersion and os_system params?
|
||||||
export function doAuthenticate(appVersion, os = null, firebaseToken = null) {
|
export function doAuthenticate(appVersion, os = null, firebaseToken = null, shareUsageData = true) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.AUTHENTICATION_STARTED,
|
type: ACTIONS.AUTHENTICATION_STARTED,
|
||||||
|
@ -78,9 +78,11 @@ export function doAuthenticate(appVersion, os = null, firebaseToken = null) {
|
||||||
data: { user, accessToken: token },
|
data: { user, accessToken: token },
|
||||||
});
|
});
|
||||||
|
|
||||||
dispatch(doRewardList());
|
if (shareUsageData) {
|
||||||
dispatch(doFetchInviteStatus());
|
dispatch(doRewardList());
|
||||||
doInstallNew(appVersion, os, firebaseToken);
|
dispatch(doFetchInviteStatus());
|
||||||
|
doInstallNew(appVersion, os, firebaseToken);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
|
Loading…
Reference in a new issue