From ddddec029f6a9921d9af21db3c5a6a55aba8fbe6 Mon Sep 17 00:00:00 2001 From: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com> Date: Wed, 8 May 2024 15:58:01 -0700 Subject: [PATCH] Update load budget loading texts (#2730) * Update load budget loading texts * Release notes --- packages/loot-core/src/client/actions/budgets.ts | 12 +----------- upcoming-release-notes/2730.md | 6 ++++++ 2 files changed, 7 insertions(+), 11 deletions(-) create mode 100644 upcoming-release-notes/2730.md diff --git a/packages/loot-core/src/client/actions/budgets.ts b/packages/loot-core/src/client/actions/budgets.ts index c663a2934..7d7c8f5a1 100644 --- a/packages/loot-core/src/client/actions/budgets.ts +++ b/packages/loot-core/src/client/actions/budgets.ts @@ -174,23 +174,13 @@ export function uploadBudget(id: string) { export function closeAndLoadBudget(fileId: string) { return async (dispatch: Dispatch) => { - // It's very important that we set this loading message before - // closing the budget. Otherwise, the manager will ignore our - // loading message and clear it when it loads, showing the file - // list which we don't want - dispatch(setAppState({ loadingText: 'Loading...' })); await dispatch(closeBudget()); - dispatch(loadBudget(fileId)); + dispatch(loadBudget(fileId, 'Loading...')); }; } export function closeAndDownloadBudget(cloudFileId: string) { return async (dispatch: Dispatch) => { - // It's very important that we set this loading message before - // closing the budget. Otherwise, the manager will ignore our - // loading message and clear it when it loads, showing the file - // list which we don't want - dispatch(setAppState({ loadingText: 'Downloading...' })); await dispatch(closeBudget()); dispatch(downloadBudget(cloudFileId, { replace: true })); }; diff --git a/upcoming-release-notes/2730.md b/upcoming-release-notes/2730.md new file mode 100644 index 000000000..398107734 --- /dev/null +++ b/upcoming-release-notes/2730.md @@ -0,0 +1,6 @@ +--- +category: Enhancements +authors: [joel-jeremy] +--- + +Smoother budget load/download loading text -- GitLab