fix: 改为远端优先实时镜像并避免自动同步反向覆盖

This commit is contained in:
JSR
2026-03-20 17:34:27 +08:00
parent 7771177f9c
commit 75679e76c5
2 changed files with 30 additions and 16 deletions
+2 -2
View File
@@ -189,7 +189,7 @@ function MainContent(): React.JSX.Element {
if (conflicts.length > 0) {
const recentLocalMutation = Date.now() - lastLocalMutationAtRef.current < 15000
if (recentLocalMutation) {
const autoApplyRes = await api.dbSyncApply("keep_local")
const autoApplyRes = await api.dbSyncApply("keep_remote")
if (
autoApplyRes?.success &&
autoApplyRes?.data?.success &&
@@ -206,7 +206,7 @@ function MainContent(): React.JSX.Element {
return
}
const applyRes = await api.dbSyncApply("keep_local")
const applyRes = await api.dbSyncApply("keep_remote")
if (applyRes?.success && applyRes?.data?.success && applyRes?.data?.synced_records > 0) {
window.dispatchEvent(
new CustomEvent("ss:data-updated", { detail: { category: "all", source: "sync" } })