Skip to content

A local-first personal finance app

Remove force reload feature (#6626)

Matiss Janis Aboltins843e95775770
diff --git a/packages/desktop-client/src/components/settings/Experimental.tsx b/packages/desktop-client/src/components/settings/Experimental.tsx
index 34b8955499..810154fedc 100644
--- a/packages/desktop-client/src/components/settings/Experimental.tsx
+++ b/packages/desktop-client/src/components/settings/Experimental.tsx
@@ -202,9 +202,6 @@ export function ExperimentalFeatures() {
>
<Trans>Crossover Report</Trans>
</FeatureToggle>
- <FeatureToggle flag="forceReload">
- <Trans>Force reload app button</Trans>
- </FeatureToggle>
{showServerPrefs && (
<ServerFeatureToggle
prefName="flags.plugins"
diff --git a/packages/desktop-client/src/components/settings/Reset.tsx b/packages/desktop-client/src/components/settings/Reset.tsx
index df1cce4ee3..5166a6b025 100644
--- a/packages/desktop-client/src/components/settings/Reset.tsx
+++ b/packages/desktop-client/src/components/settings/Reset.tsx
@@ -5,7 +5,6 @@ import { ButtonWithLoading } from '@actual-app/components/button';
import { Text } from '@actual-app/components/text';
import { send } from 'loot-core/platform/client/fetch';
-import { isElectron } from 'loot-core/shared/environment';
import { Setting } from './UI';
@@ -89,46 +88,3 @@ export function ResetSync() {
</Setting>
);
}
-
-export function ForceReload() {
- const [reloading, setReloading] = useState(false);
-
- async function onForceReload() {
- setReloading(true);
- try {
- if (!isElectron()) {
- const registration =
- await window.navigator.serviceWorker.getRegistration('/');
- if (registration) {
- await registration.update();
- if (registration.waiting) {
- registration.waiting.postMessage({ type: 'SKIP_WAITING' });
- }
- }
- }
- } catch {
- // Do nothing
- } finally {
- window.location.reload();
- }
- }
-
- return (
- <Setting
- primaryAction={
- <ButtonWithLoading isLoading={reloading} onPress={onForceReload}>
- <Trans>Force reload app</Trans>
- </ButtonWithLoading>
- }
- >
- <Text>
- <Trans>
- <strong>Force reload app</strong> will clear the cached version of the
- app and load a fresh one. This is useful if you&apos;re experiencing
- issues with the app after an update or if cached files are causing
- problems. The app will reload automatically after clearing the cache.
- </Trans>
- </Text>
- </Setting>
- );
-}
diff --git a/packages/desktop-client/src/components/settings/index.tsx b/packages/desktop-client/src/components/settings/index.tsx
index b536e7b517..04704445e5 100644
--- a/packages/desktop-client/src/components/settings/index.tsx
+++ b/packages/desktop-client/src/components/settings/index.tsx
@@ -23,7 +23,7 @@ import { ExportBudget } from './Export';
import { FormatSettings } from './Format';
import { LanguageSettings } from './LanguageSettings';
import { RepairTransactions } from './RepairTransactions';
-import { ForceReload, ResetCache, ResetSync } from './Reset';
+import { ResetCache, ResetSync } from './Reset';
import { ThemeSettings } from './Themes';
import { AdvancedToggle, Setting } from './UI';
@@ -176,7 +176,6 @@ export function Settings() {
const [budgetName] = useMetadataPref('budgetName');
const dispatch = useDispatch();
const isCurrencyExperimentalEnabled = useFeatureFlag('currency');
- const isForceReloadEnabled = useFeatureFlag('forceReload');
const [_, setDefaultCurrencyCodePref] = useSyncedPref('defaultCurrencyCode');
const onCloseBudget = () => {
@@ -253,7 +252,6 @@ export function Settings() {
<ExportBudget />
<AdvancedToggle>
<AdvancedAbout />
- {isForceReloadEnabled && <ForceReload />}
<ResetCache />
<ResetSync />
<RepairTransactions />
diff --git a/packages/desktop-client/src/hooks/useFeatureFlag.ts b/packages/desktop-client/src/hooks/useFeatureFlag.ts
index 99248c579c..5599586755 100644
--- a/packages/desktop-client/src/hooks/useFeatureFlag.ts
+++ b/packages/desktop-client/src/hooks/useFeatureFlag.ts
@@ -9,7 +9,6 @@ const DEFAULT_FEATURE_FLAG_STATE: Record<FeatureFlag, boolean> = {
formulaMode: false,
currency: false,
crossoverReport: false,
- forceReload: false,
};
export function useFeatureFlag(name: FeatureFlag): boolean {
diff --git a/packages/loot-core/src/types/prefs.ts b/packages/loot-core/src/types/prefs.ts
index a2ef67cf49..48de342102 100644
--- a/packages/loot-core/src/types/prefs.ts
+++ b/packages/loot-core/src/types/prefs.ts
@@ -4,8 +4,7 @@ export type FeatureFlag =
| 'actionTemplating'
| 'formulaMode'
| 'currency'
- | 'crossoverReport'
- | 'forceReload';
+ | 'crossoverReport';
/**
* Cross-device preferences. These sync across devices when they are changed.
diff --git a/upcoming-release-notes/6626.md b/upcoming-release-notes/6626.md
new file mode 100644
index 0000000000..55c3c6655c
--- /dev/null
+++ b/upcoming-release-notes/6626.md
@@ -0,0 +1,6 @@
+---
+category: Maintenance
+authors: [MatissJanis]
+---
+
+Remove the force reload feature from the application settings.