Skip to content

Commit

Permalink
Fix launch store
Browse files Browse the repository at this point in the history
  • Loading branch information
appupgrade-dev committed Mar 24, 2023
1 parent 53d407e commit ff8a713
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/version-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ async function versionCheck(appInfo, xApiKey, alertInfo) {

function showForceUpgradeAlert(appInfo, alertInfo, msg) {
Alert.alert(
alertInfo.title,
alertInfo.title ? alertInfo.title : "Please update",
msg,
[
{
text: alertInfo.updateButtonTitle,
text: alertInfo.updateButtonTitle ? alertInfo.updateButtonTitle : "Update Now",
onPress: () => {
showForceUpgradeAlert(appInfo, alertInfo, msg)
redirectToStore(appInfo)
Expand All @@ -51,16 +51,16 @@ function showForceUpgradeAlert(appInfo, alertInfo, msg) {

function showUpgradeAlert(appInfo, alertInfo, msg) {
Alert.alert(
alertInfo.title,
alertInfo.title ? alertInfo.title : "Please update",
msg,
[
{
text: alertInfo.laterButtonTitle,
text: alertInfo.laterButtonTitle ? alertInfo.laterButtonTitle : "Later",
onPress: () =>
alertInfo.onLaterCallback ? alertInfo.onLaterCallback() : null,
},
{
text: alertInfo.updateButtonTitle,
text: alertInfo.updateButtonTitle ? alertInfo.updateButtonTitle: "Update Now",
onPress: () => redirectToStore(appInfo),
},
],
Expand All @@ -86,9 +86,9 @@ function redirectToStore(appInfo) {
const url = `https://www.amazon.com/gp/mas/dl/android?p=${appInfo.appId}`;
openPreferredAndroidMarket(url, defaultGooglePlaystoreUrl);
} else if (appInfo.preferredAndroidMarket === PreferredAndroidMarket.OTHER) {
Linking.openPreferredAndroidMarket(appInfo.otherAndroidMarketUrl);
openPreferredAndroidMarket(appInfo.otherAndroidMarketUrl);
} else {
Linking.openPreferredAndroidMarket(`https://play.google.com/store/apps/details?id=${appInfo.appId}`);
openPreferredAndroidMarket(`https://play.google.com/store/apps/details?id=${appInfo.appId}`);
}
} else {
Linking.openURL(`https://apps.apple.com/app/id/${appInfo.appId}`);
Expand Down

0 comments on commit ff8a713

Please sign in to comment.