Skip to content

Commit

Permalink
mobile: fix wording of push/pull sync
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarahm-ed authored and thecodrr committed May 9, 2024
1 parent 9a866a5 commit d3c1c19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
13 changes: 2 additions & 11 deletions apps/mobile/app/components/announcements/cta.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import React from "react";
import { Linking, View } from "react-native";
//import SettingsBackupAndRestore from '../../screens/settings/backup-restore';
import { eSendEvent, presentSheet } from "../../services/event-manager";
import Sync from "../../services/sync";
import { useThemeColors } from "@notesnook/theme";
import { eCloseAnnouncementDialog, eCloseSheet } from "../../utils/events";
import { eSendEvent, presentSheet } from "../../services/event-manager";
import { eCloseAnnouncementDialog } from "../../utils/events";
import { SIZE } from "../../utils/size";
import { sleep } from "../../utils/time";
import { PricingPlans } from "../premium/pricing-plans";
import SheetProvider from "../sheet-provider";
import { Progress } from "../sheets/progress";
import { Button } from "../ui/button";
import { allowedOnPlatform, getStyle } from "./functions";

Expand Down Expand Up @@ -56,13 +54,6 @@ export const Cta = ({ actions, style = {}, color, inline }) => {
/>
)
});
} else if (item.type === "force-sync") {
eSendEvent(eCloseSheet);
await sleep(300);
Progress.present();
Sync.run("global", true, "full", () => {
eSendEvent(eCloseSheet);
});
}
};
return (
Expand Down
12 changes: 5 additions & 7 deletions apps/mobile/app/screens/settings/settings-data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ export const settingsGroups: SettingSection[] = [
id: "background-sync",
name: "Background sync (experimental)",
description:
"Periodically wake up the app in background to sync your notes from other devices.",
"Periodically wake up the app in background to run sync.",
type: "switch",
property: "backgroundSync",
onChange: (value) => {
Expand All @@ -472,13 +472,12 @@ export const settingsGroups: SettingSection[] = [
{
id: "pull-sync",
name: "Force pull changes",
description:
"Force pull changes from the server. Use this if some changes are not appearing on this device.",
description: `Use this if some changes are not appearing on this device from other devices. This will pull everything from the server and overwrite with whatever is one this device.\n\nThese must only be used for troubleshooting. Using them regularly for sync is not recommended and will lead to unexpected data loss and other issues. If you are having persistent issues with sync, please report them to us at support@streetwriters.co.`,
modifer: () => {
presentDialog({
title: "Force Pull changes",
paragraph:
"Force pull changes from the server. Run this if some changes are not appearing on this device.",
"This must only be used for troubleshooting. Using this regularly for sync is not recommended and will lead to unexpected data loss and other issues. If you are having persistent issues with sync, please report them to us at support@streetwriters.co.",
negativeText: "Cancel",
positiveText: "Start",
positivePress: async () => {
Expand All @@ -495,13 +494,12 @@ export const settingsGroups: SettingSection[] = [
{
id: "push-sync",
name: "Force push changes",
description:
"Force push changes to the server. Use this if some changes from this device are not appearing on other devices.",
description: `Use this if some changes are not appearing on this device from other devices. This will pull everything from the server and overwrite with whatever is one this device.`,
modifer: () => {
presentDialog({
title: "Force Push changes",
paragraph:
"Force push changes to the server. Run this only if some changes from this device are not appearing on other devices.",
"This must only be used for troubleshooting. Using this regularly for sync is not recommended and will lead to unexpected data loss and other issues. If you are having persistent issues with sync, please report them to us at support@streetwriters.co.",
negativeText: "Cancel",
positiveText: "Start",
positivePress: async () => {
Expand Down

0 comments on commit d3c1c19

Please sign in to comment.