From 50152b394d5d9d241dde0016e58e41e0af27e8c0 Mon Sep 17 00:00:00 2001 From: GOVINDDIXIT Date: Sun, 19 Jul 2020 13:03:55 +0530 Subject: [PATCH] share app for fdroid --- app/constants/links.js | 1 + app/views/SettingsView/index.js | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/constants/links.js b/app/constants/links.js index f676ded9a..edadf3d7b 100644 --- a/app/constants/links.js +++ b/app/constants/links.js @@ -3,6 +3,7 @@ import { getBundleId, isIOS } from '../utils/deviceInfo'; const APP_STORE_ID = '1272915472'; 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 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 }`; diff --git a/app/views/SettingsView/index.js b/app/views/SettingsView/index.js index 39288bf16..335b1c7f5 100644 --- a/app/views/SettingsView/index.js +++ b/app/views/SettingsView/index.js @@ -27,7 +27,9 @@ import scrollPersistTaps from '../../utils/scrollPersistTaps'; import { showErrorAlert, showConfirmationAlert } from '../../utils/info'; import styles from './styles'; 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 SidebarView from '../SidebarView'; import { LISTENER } from '../../containers/Toast'; @@ -159,7 +161,8 @@ class SettingsView extends React.Component { } 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 = () => {