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
5
dist/bundle.es.js
vendored
5
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?
|
||||
|
||||
function doAuthenticate(appVersion, os = null, firebaseToken = null) {
|
||||
function doAuthenticate(appVersion, os = null, firebaseToken = null, shareUsageData = true) {
|
||||
return dispatch => {
|
||||
dispatch({
|
||||
type: AUTHENTICATION_STARTED
|
||||
|
@ -1310,9 +1310,12 @@ function doAuthenticate(appVersion, os = null, firebaseToken = null) {
|
|||
accessToken: token
|
||||
}
|
||||
});
|
||||
|
||||
if (shareUsageData) {
|
||||
dispatch(doRewardList());
|
||||
dispatch(doFetchInviteStatus());
|
||||
doInstallNew(appVersion, os, firebaseToken);
|
||||
}
|
||||
});
|
||||
}).catch(error => {
|
||||
dispatch({
|
||||
|
|
4
dist/bundle.js
vendored
4
dist/bundle.js
vendored
|
@ -4927,6 +4927,7 @@ function doInstallNew(appVersion) {
|
|||
function doAuthenticate(appVersion) {
|
||||
var os = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 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) {
|
||||
dispatch({
|
||||
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["AUTHENTICATION_STARTED"]
|
||||
|
@ -4940,9 +4941,12 @@ function doAuthenticate(appVersion) {
|
|||
accessToken: token
|
||||
}
|
||||
});
|
||||
|
||||
if (shareUsageData) {
|
||||
dispatch(Object(redux_actions_rewards__WEBPACK_IMPORTED_MODULE_2__["doRewardList"])());
|
||||
dispatch(doFetchInviteStatus());
|
||||
doInstallNew(appVersion, os, firebaseToken);
|
||||
}
|
||||
});
|
||||
})["catch"](function (error) {
|
||||
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?
|
||||
export function doAuthenticate(appVersion, os = null, firebaseToken = null) {
|
||||
export function doAuthenticate(appVersion, os = null, firebaseToken = null, shareUsageData = true) {
|
||||
return dispatch => {
|
||||
dispatch({
|
||||
type: ACTIONS.AUTHENTICATION_STARTED,
|
||||
|
@ -78,9 +78,11 @@ export function doAuthenticate(appVersion, os = null, firebaseToken = null) {
|
|||
data: { user, accessToken: token },
|
||||
});
|
||||
|
||||
if (shareUsageData) {
|
||||
dispatch(doRewardList());
|
||||
dispatch(doFetchInviteStatus());
|
||||
doInstallNew(appVersion, os, firebaseToken);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
|
|
Loading…
Reference in a new issue