Merge pull request #98 from lbryio/feat-installNewDomain

add domain to install new
This commit is contained in:
jessopb 2020-06-05 10:11:28 -04:00 committed by GitHub
commit ca5984cd79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 10 deletions

9
dist/bundle.es.js vendored
View file

@ -1323,9 +1323,10 @@ function doFetchInviteStatus(shouldCallRewardList = true) {
});
};
}
function doInstallNew(appVersion, os = null, firebaseToken = null, callbackForUsersWhoAreSharingData) {
function doInstallNew(appVersion, os = null, firebaseToken = null, callbackForUsersWhoAreSharingData, domain) {
const payload = {
app_version: appVersion
app_version: appVersion,
domain
};
if (firebaseToken) {
@ -1366,7 +1367,7 @@ function doInstallNewWithParams(appVersion, installationId, nodeId, lbrynetVersi
};
} // 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, callbackForUsersWhoAreSharingData, callInstall = true) {
function doAuthenticate(appVersion, os = null, firebaseToken = null, shareUsageData = true, callbackForUsersWhoAreSharingData, callInstall = true, domain = null) {
return dispatch => {
dispatch({
type: AUTHENTICATION_STARTED
@ -1386,7 +1387,7 @@ function doAuthenticate(appVersion, os = null, firebaseToken = null, shareUsageD
dispatch(doFetchInviteStatus(false));
if (callInstall) {
doInstallNew(appVersion, os, firebaseToken, callbackForUsersWhoAreSharingData);
doInstallNew(appVersion, os, firebaseToken, callbackForUsersWhoAreSharingData, domain);
}
}
});

7
dist/bundle.js vendored
View file

@ -5036,8 +5036,10 @@ function doInstallNew(appVersion) {
var os = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var firebaseToken = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var callbackForUsersWhoAreSharingData = arguments.length > 3 ? arguments[3] : undefined;
var domain = arguments.length > 4 ? arguments[4] : undefined;
var payload = {
app_version: appVersion
app_version: appVersion,
domain: domain
};
if (firebaseToken) {
@ -5085,6 +5087,7 @@ function doAuthenticate(appVersion) {
var shareUsageData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
var callbackForUsersWhoAreSharingData = arguments.length > 4 ? arguments[4] : undefined;
var callInstall = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
var domain = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
return function (dispatch) {
dispatch({
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["AUTHENTICATION_STARTED"]
@ -5104,7 +5107,7 @@ function doAuthenticate(appVersion) {
dispatch(doFetchInviteStatus(false));
if (callInstall) {
doInstallNew(appVersion, os, firebaseToken, callbackForUsersWhoAreSharingData);
doInstallNew(appVersion, os, firebaseToken, callbackForUsersWhoAreSharingData, domain);
}
}
});

View file

@ -52,9 +52,10 @@ export function doInstallNew(
appVersion,
os = null,
firebaseToken = null,
callbackForUsersWhoAreSharingData
callbackForUsersWhoAreSharingData,
domain
) {
const payload = { app_version: appVersion };
const payload = { app_version: appVersion, domain };
if (firebaseToken) {
payload.firebase_token = firebaseToken;
}
@ -106,7 +107,8 @@ export function doAuthenticate(
firebaseToken = null,
shareUsageData = true,
callbackForUsersWhoAreSharingData,
callInstall = true
callInstall = true,
domain = null
) {
return dispatch => {
dispatch({
@ -125,7 +127,13 @@ export function doAuthenticate(
dispatch(doRewardList());
dispatch(doFetchInviteStatus(false));
if (callInstall) {
doInstallNew(appVersion, os, firebaseToken, callbackForUsersWhoAreSharingData);
doInstallNew(
appVersion,
os,
firebaseToken,
callbackForUsersWhoAreSharingData,
domain
);
}
}
});