support syncing the settings autoUpdateExchangeRatesData, showAddTransactionButtonInDesktopNavbar, mapCacheExpiration, and exchangeRatesDataCacheExpiration

This commit is contained in:
MaysWind
2026-03-01 21:08:16 +08:00
parent c4c9503e31
commit a84f48ae8a
11 changed files with 118 additions and 84 deletions
+5 -3
View File
@@ -10,6 +10,8 @@ import { useExchangeRatesStore } from '@/stores/exchangeRates.ts';
import { CategoryType } from '@/core/category.ts';
import type { RegisterResponse } from '@/models/auth_response.ts';
import type { User } from '@/models/user.ts';
import { updateMapCacheExpiration } from '@/lib/cache.ts';
import { setExpenseAndIncomeAmountColor } from '@/lib/ui/common.ts';
export function useSignupPageBase() {
@@ -114,9 +116,9 @@ export function useSignupPageBase() {
setExpenseAndIncomeAmountColor(response.user.expenseAmountColor, response.user.incomeAmountColor);
}
if (settingsStore.appSettings.autoUpdateExchangeRatesData) {
exchangeRatesStore.getLatestExchangeRates({ silent: true, force: false });
}
updateMapCacheExpiration(settingsStore.appSettings.mapCacheExpiration);
exchangeRatesStore.removeExpiredExchangeRates(true);
exchangeRatesStore.autoUpdateExchangeRatesData();
if (response.notificationContent) {
rootStore.setNotificationContent(response.notificationContent);