From 32697018394c1f06dd90691054b025ed19eb336c Mon Sep 17 00:00:00 2001 From: Matiss Janis Aboltins Date: Thu, 1 Feb 2024 13:48:33 +0000 Subject: [PATCH 1/3] :bug: (goCardless) patch incomplete migration --- .../src/components/accounts/Header.jsx | 15 +++++++++++---- ...2023731_add_missing_goCardless_sync_source.sql | 9 +++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 packages/loot-core/migrations/1704572023731_add_missing_goCardless_sync_source.sql diff --git a/packages/desktop-client/src/components/accounts/Header.jsx b/packages/desktop-client/src/components/accounts/Header.jsx index da5608da11a..3c4f79a78a6 100644 --- a/packages/desktop-client/src/components/accounts/Header.jsx +++ b/packages/desktop-client/src/components/accounts/Header.jsx @@ -83,11 +83,14 @@ export function AccountHeader({ const [menuOpen, setMenuOpen] = useState(false); const searchInput = useRef(null); const splitsExpanded = useSplitsExpanded(); + const syncServerStatus = useSyncServerStatus(); + const isUsingServer = syncServerStatus !== 'no-server'; + const isServerOffline = syncServerStatus === 'offline'; - let canSync = account && account.account_id; + let canSync = account && account.account_id && isUsingServer; if (!account) { // All accounts - check for any syncable account - canSync = !!accounts.find(account => !!account.account_id); + canSync = !!accounts.find(account => !!account.account_id) && isUsingServer; } function onToggleSplits() { @@ -210,7 +213,11 @@ export function AccountHeader({ style={{ marginTop: 12 }} > {((account && !account.closed) || canSync) && ( -