Skip to content

Commit

Permalink
fix: don't show reload popup twice
Browse files Browse the repository at this point in the history
  • Loading branch information
Palm authored Mar 18, 2024
1 parent 714078e commit 30c5535
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions src/lib/debug.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import { DEVELOPMENT_DISTRIBUTION_URL } from "@lib/constants";
import logger from "@lib/logger";
import {
BundleUpdaterManager,
ClientInfoManager,
DeviceManager
} from "@lib/native";
import { ClientInfoManager, DeviceManager } from "@lib/native";
import { after } from "@lib/patcher";
import settings, { loaderConfig } from "@lib/settings";
import { getCurrentTheme, selectTheme } from "@lib/themes";
import { ReactNative as RN } from "@metro/common";
import { ButtonColors, type RNConstants } from "@types";
import { showConfirmationAlert } from "@ui/alerts";
import { type RNConstants } from "@types";
import { getAssetIDByName } from "@ui/assets";
import { showToast } from "@ui/toasts";
import { removeCachedScript } from "./storage";
Expand Down Expand Up @@ -167,13 +162,4 @@ export async function setDevelopmentBuildEnabled(enabled: boolean) {
settings.developmentBuildEnabled = enabled;

await removeCachedScript();

showConfirmationAlert({
title: "Reload required",
content: "Changes will only apply next time the app launches or reloads.",
confirmText: "Reload now",
cancelText: "Later",
confirmColor: ButtonColors.PRIMARY,
onConfirm: BundleUpdaterManager.reload
});
}

0 comments on commit 30c5535

Please sign in to comment.