share app for fdroid

This commit is contained in:
GOVINDDIXIT 2020-07-19 13:03:55 +05:30
parent 5c37a88525
commit 50152b394d
2 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,7 @@ import { getBundleId, isIOS } from '../utils/deviceInfo';
const APP_STORE_ID = '1272915472'; const APP_STORE_ID = '1272915472';
export const PLAY_MARKET_LINK = `https://play.google.com/store/apps/details?id=${ getBundleId }`; export const PLAY_MARKET_LINK = `https://play.google.com/store/apps/details?id=${ getBundleId }`;
export const FDROID_MARKET_LINK = 'https://f-droid.org/repo/chat.rocket.android_2057.apk'; // Once link is finalised, Update this
export const APP_STORE_LINK = `https://itunes.apple.com/app/id${ APP_STORE_ID }`; export const APP_STORE_LINK = `https://itunes.apple.com/app/id${ APP_STORE_ID }`;
export const LICENSE_LINK = 'https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/develop/LICENSE'; export const LICENSE_LINK = 'https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/develop/LICENSE';
export const STORE_REVIEW_LINK = isIOS ? `itms-apps://itunes.apple.com/app/id${ APP_STORE_ID }?action=write-review` : `market://details?id=${ getBundleId }`; export const STORE_REVIEW_LINK = isIOS ? `itms-apps://itunes.apple.com/app/id${ APP_STORE_ID }?action=write-review` : `market://details?id=${ getBundleId }`;

View File

@ -27,7 +27,9 @@ import scrollPersistTaps from '../../utils/scrollPersistTaps';
import { showErrorAlert, showConfirmationAlert } from '../../utils/info'; import { showErrorAlert, showConfirmationAlert } from '../../utils/info';
import styles from './styles'; import styles from './styles';
import { loggerConfig, analytics } from '../../utils/log'; import { loggerConfig, analytics } from '../../utils/log';
import { PLAY_MARKET_LINK, APP_STORE_LINK, LICENSE_LINK } from '../../constants/links'; import {
PLAY_MARKET_LINK, FDROID_MARKET_LINK, APP_STORE_LINK, LICENSE_LINK
} from '../../constants/links';
import { withTheme } from '../../theme'; import { withTheme } from '../../theme';
import SidebarView from '../SidebarView'; import SidebarView from '../SidebarView';
import { LISTENER } from '../../containers/Toast'; import { LISTENER } from '../../containers/Toast';
@ -159,7 +161,8 @@ class SettingsView extends React.Component {
} }
shareApp = () => { shareApp = () => {
Share.share({ message: isAndroid ? PLAY_MARKET_LINK : APP_STORE_LINK }); // eslint-disable-next-line no-nested-ternary
Share.share({ message: isAndroid ? (isGooglePlayBuild ? PLAY_MARKET_LINK : FDROID_MARKET_LINK) : APP_STORE_LINK });
} }
copyServerVersion = () => { copyServerVersion = () => {