Remove force reload feature (#6626)

* Remove force reload feature flag and related code

Co-authored-by: matiss <matiss@mja.lv>

* Add release notes for PR #6626

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Matiss Janis Aboltins
2026-01-12 09:39:04 +01:00
committed by GitHub
parent 073725e270
commit 843e957757
6 changed files with 8 additions and 53 deletions

View File

@@ -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"

View File

@@ -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>
);
}

View File

@@ -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 />

View File

@@ -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 {

View File

@@ -4,8 +4,7 @@ export type FeatureFlag =
| 'actionTemplating'
| 'formulaMode'
| 'currency'
| 'crossoverReport'
| 'forceReload';
| 'crossoverReport';
/**
* Cross-device preferences. These sync across devices when they are changed.

View File

@@ -0,0 +1,6 @@
---
category: Maintenance
authors: [MatissJanis]
---
Remove the force reload feature from the application settings.