Fix ZeldaZach review for PR 7496: deck path in ctor, server-time baseline, single-query sync check

This commit is contained in:
Lukas Brübach 2026-10-13 07:21:42 +02:00 • committed by Lukas Brübach
parent 04456b7ad3
commit 00cb839a30
6 changed files with 30 additions and 41 deletions

View file

@ -260,6 +260,13 @@ TabDeckStorage::TabDeckStorage(TabSupervisor *_tabSupervisor,
syncManager = new DeckSyncManager(
client, [](const DeckList &deck) { return getDeckColorIdentity(deck, CardDatabaseManager::query()); }, this);
syncManager->setDeckPath(SettingsCache::instance().paths().getDeckPath());
connect(&SettingsCache::instance().paths(), &PathsSettings::deckPathChanged, this, [this] {
const QString deckPath = SettingsCache::instance().paths().getDeckPath();
localDirModel->setRootPath(deckPath);
localDirView->setRootIndex(localDirModel->index(localDirModel->rootPath(), 0));
syncManager->setDeckPath(deckPath);
});
syncManager->setConflictDefault(SettingsCache::instance().deckSync().getConflictDefault());
syncManager->setAutoSyncEnabled(SettingsCache::instance().deckSync().getAutoSync());
syncManager->setSyncIntervalMinutes(SettingsCache::instance().deckSync().getSyncIntervalMinutes());