Skip to content

Commit

Permalink
Only show gossip sync setting on mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
hsjoberg committed Jun 27, 2023
1 parent dc44154 commit 6b69cd9
Showing 1 changed file with 29 additions and 26 deletions.
55 changes: 29 additions & 26 deletions src/windows/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import TorSvg from "./TorSvg";
import { fromUnixTime } from "date-fns";
import { readFile } from "react-native-fs";
import { useTranslation } from "react-i18next";
import { Chain } from "../../utils/build";

let ReactNativePermissions: any;
if (PLATFORM !== "macos") {
Expand Down Expand Up @@ -2044,32 +2045,34 @@ ${t("experimental.tor.disabled.msg2")}`;
/>
</Right>
</ListItem>
<ListItem
style={style.listItem}
icon={true}
onPress={onToggleScheduledGossipSyncEnabled}
onLongPress={onLongPressScheduledGossipSyncEnabled}
>
<Left>
<Icon style={style.icon} type="MaterialCommunityIcons" name="cog-sync" />
</Left>
<Body>
<Text>
{PLATFORM === "android"
? t("security.gossipSyncAndroid.title")
: t("security.gossipSync.title")}
</Text>
{PLATFORM === "android" && (
<Text note={true}>{t("security.gossipSyncAndroid.subtitle", { hours: "24" })}</Text>
)}
</Body>
<Right>
<CheckBox
checked={scheduledGossipSyncEnabled}
onPress={onToggleScheduledGossipSyncEnabled}
/>
</Right>
</ListItem>
{Chain === "mainnet" &&
<ListItem
style={style.listItem}
icon={true}
onPress={onToggleScheduledGossipSyncEnabled}
onLongPress={onLongPressScheduledGossipSyncEnabled}
>
<Left>
<Icon style={style.icon} type="MaterialCommunityIcons" name="cog-sync" />
</Left>
<Body>
<Text>
{PLATFORM === "android"
? t("security.gossipSyncAndroid.title")
: t("security.gossipSync.title")}
</Text>
{PLATFORM === "android" && (
<Text note={true}>{t("security.gossipSyncAndroid.subtitle", { hours: "24" })}</Text>
)}
</Body>
<Right>
<CheckBox
checked={scheduledGossipSyncEnabled}
onPress={onToggleScheduledGossipSyncEnabled}
/>
</Right>
</ListItem>
}

<ListItem style={style.itemHeader} itemHeader={true}>
<Text>{t("debug.title")}</Text>
Expand Down

0 comments on commit 6b69cd9

Please sign in to comment.