Android: Synchronize with myTeamSpeak; keep each installation's default identity
Settings → myTeamSpeak gets Synchronize, with conflicts settled in SyncConflictsScreen. The default identity is no longer a synced field: an identity new to the account carries it only when the account has none, and one brought here takes it only when we have none, so installations stop flipping each other's default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -41,14 +41,18 @@ the captured login and item), `MyTeamSpeakLoginTest` (persistence, failed sign-i
|
||||
## Two-way sync
|
||||
|
||||
`MyTeamSpeakSync` (with `SyncKind`, `SyncFields`, `SyncState`): bookmarks and identities, run by hand
|
||||
(Swing: Options → myTeamSpeak → Synchronize; conflicts in `SyncConflictsDialog`). A run is
|
||||
(Swing: Options → myTeamSpeak → Synchronize, conflicts in `SyncConflictsDialog`; Android: Settings →
|
||||
myTeamSpeak → Synchronize, conflicts in `ui/SyncConflictsScreen.kt`). A run is
|
||||
`fetch` (network) → `plan` (stores' thread) → user settles `Plan.conflicts()` → `upload` (network) → `apply`
|
||||
(stores' thread). Nothing changes on either side before `upload`, and here only after it succeeded.
|
||||
|
||||
The comparison is three-way per item, against `SyncState` (profile file `myteamspeak-sync.properties`: the
|
||||
global cursor, each class's cursor, and per item its server revision, plaintext `Item_Data` and local id).
|
||||
Changed on one side → carried over (deletions too); on both → a `Conflict` with a field-by-field diff;
|
||||
first run → items paired by identity UID or bookmark name+address, the rest carried over. Edits are
|
||||
first run → items paired by identity UID or bookmark name+address, the rest carried over. The default
|
||||
identity is each installation's own: `is_default` is not compared, an identity new to the account is
|
||||
uploaded as its default only when it has none, and one brought here becomes ours only when we have none
|
||||
(otherwise installations flip each other's default on every run). Edits are
|
||||
written over the item's current `Item_Data` field by field (`ProtobufMessage`), so fields this client does not
|
||||
model survive.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user