update variable name
This commit is contained in:
parent
b27a99aaa3
commit
a53cffb0d8
3 changed files with 20 additions and 15 deletions
10
dist/bundle.es.js
vendored
10
dist/bundle.es.js
vendored
|
@ -1275,7 +1275,7 @@ function doFetchInviteStatus() {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
function doInstallNew(appVersion, os = null, firebaseToken = null, callback) {
|
function doInstallNew(appVersion, os = null, firebaseToken = null, callbackForUsersWhoAreSharingData) {
|
||||||
const payload = {
|
const payload = {
|
||||||
app_version: appVersion
|
app_version: appVersion
|
||||||
};
|
};
|
||||||
|
@ -1293,14 +1293,14 @@ function doInstallNew(appVersion, os = null, firebaseToken = null, callback) {
|
||||||
payload.platform = version.platform;
|
payload.platform = version.platform;
|
||||||
Lbryio.call('install', 'new', payload);
|
Lbryio.call('install', 'new', payload);
|
||||||
|
|
||||||
if (callback) {
|
if (callbackForUsersWhoAreSharingData) {
|
||||||
callback(status);
|
callbackForUsersWhoAreSharingData(status);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} // 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, shareUsageData = true, callback) {
|
function doAuthenticate(appVersion, os = null, firebaseToken = null, shareUsageData = true, callbackForUsersWhoAreSharingData) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: AUTHENTICATION_STARTED
|
type: AUTHENTICATION_STARTED
|
||||||
|
@ -1318,7 +1318,7 @@ function doAuthenticate(appVersion, os = null, firebaseToken = null, shareUsageD
|
||||||
if (shareUsageData) {
|
if (shareUsageData) {
|
||||||
dispatch(doRewardList());
|
dispatch(doRewardList());
|
||||||
dispatch(doFetchInviteStatus());
|
dispatch(doFetchInviteStatus());
|
||||||
doInstallNew(appVersion, os, firebaseToken, callback);
|
doInstallNew(appVersion, os, firebaseToken, callbackForUsersWhoAreSharingData);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
|
10
dist/bundle.js
vendored
10
dist/bundle.js
vendored
|
@ -4904,7 +4904,7 @@ function doFetchInviteStatus() {
|
||||||
function doInstallNew(appVersion) {
|
function doInstallNew(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 callback = arguments.length > 3 ? arguments[3] : undefined;
|
var callbackForUsersWhoAreSharingData = arguments.length > 3 ? arguments[3] : undefined;
|
||||||
var payload = {
|
var payload = {
|
||||||
app_version: appVersion
|
app_version: appVersion
|
||||||
};
|
};
|
||||||
|
@ -4922,8 +4922,8 @@ function doInstallNew(appVersion) {
|
||||||
payload.platform = version.platform;
|
payload.platform = version.platform;
|
||||||
lbryio__WEBPACK_IMPORTED_MODULE_5__["default"].call('install', 'new', payload);
|
lbryio__WEBPACK_IMPORTED_MODULE_5__["default"].call('install', 'new', payload);
|
||||||
|
|
||||||
if (callback) {
|
if (callbackForUsersWhoAreSharingData) {
|
||||||
callback(status);
|
callbackForUsersWhoAreSharingData(status);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -4933,7 +4933,7 @@ 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;
|
var shareUsageData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
||||||
var callback = arguments.length > 4 ? arguments[4] : undefined;
|
var callbackForUsersWhoAreSharingData = arguments.length > 4 ? arguments[4] : undefined;
|
||||||
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"]
|
||||||
|
@ -4951,7 +4951,7 @@ function doAuthenticate(appVersion) {
|
||||||
if (shareUsageData) {
|
if (shareUsageData) {
|
||||||
dispatch(Object(redux_actions_rewards__WEBPACK_IMPORTED_MODULE_2__["doRewardList"])());
|
dispatch(Object(redux_actions_rewards__WEBPACK_IMPORTED_MODULE_2__["doRewardList"])());
|
||||||
dispatch(doFetchInviteStatus());
|
dispatch(doFetchInviteStatus());
|
||||||
doInstallNew(appVersion, os, firebaseToken, callback);
|
doInstallNew(appVersion, os, firebaseToken, callbackForUsersWhoAreSharingData);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})["catch"](function (error) {
|
})["catch"](function (error) {
|
||||||
|
|
|
@ -45,7 +45,12 @@ export function doFetchInviteStatus() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doInstallNew(appVersion, os = null, firebaseToken = null, callback) {
|
export function doInstallNew(
|
||||||
|
appVersion,
|
||||||
|
os = null,
|
||||||
|
firebaseToken = null,
|
||||||
|
callbackForUsersWhoAreSharingData
|
||||||
|
) {
|
||||||
const payload = { app_version: appVersion };
|
const payload = { app_version: appVersion };
|
||||||
if (firebaseToken) {
|
if (firebaseToken) {
|
||||||
payload.firebase_token = firebaseToken;
|
payload.firebase_token = firebaseToken;
|
||||||
|
@ -60,8 +65,8 @@ export function doInstallNew(appVersion, os = null, firebaseToken = null, callba
|
||||||
payload.platform = version.platform;
|
payload.platform = version.platform;
|
||||||
Lbryio.call('install', 'new', payload);
|
Lbryio.call('install', 'new', payload);
|
||||||
|
|
||||||
if (callback) {
|
if (callbackForUsersWhoAreSharingData) {
|
||||||
callback(status);
|
callbackForUsersWhoAreSharingData(status);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -73,7 +78,7 @@ export function doAuthenticate(
|
||||||
os = null,
|
os = null,
|
||||||
firebaseToken = null,
|
firebaseToken = null,
|
||||||
shareUsageData = true,
|
shareUsageData = true,
|
||||||
callback
|
callbackForUsersWhoAreSharingData
|
||||||
) {
|
) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
|
@ -91,7 +96,7 @@ export function doAuthenticate(
|
||||||
if (shareUsageData) {
|
if (shareUsageData) {
|
||||||
dispatch(doRewardList());
|
dispatch(doRewardList());
|
||||||
dispatch(doFetchInviteStatus());
|
dispatch(doFetchInviteStatus());
|
||||||
doInstallNew(appVersion, os, firebaseToken, callback);
|
doInstallNew(appVersion, os, firebaseToken, callbackForUsersWhoAreSharingData);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue