Files
amethyst/commons
Claude 6f1292bfcf refactor: replace @Synchronized / @Volatile with KMP primitives
Clears the last of the JVM-only synchronization annotations from
commons/commonMain so the model layer can compile on iOS. 15
methods across 4 files migrated.

- @Synchronized -> KmpLock.withLock { } with one per-instance syncLock
  field per class. Original semantics preserved: @Synchronized on
  methods of the same class synchronized on `this`, and a single
  per-instance KmpLock gives the same exclusion.

  * Channel.kt: addRelaySync, createOrDestroyFlowSync
  * Chatroom.kt: addMessageSync, removeMessageSync
  * MarmotGroupChatroom.kt: placeholderNote, addMessageSync,
    restoreMessageSync, removeMessageSync, clearAllMessagesSync
  * Note.kt: innerAddZap, innerAddOnchainZap,
    innerRemoveOnchainZapForSource, innerAddZapPayment, addRelaySync,
    createOrDestroyFlowSync

- Note.kt's @Volatile fields: now use kotlin.concurrent.Volatile
  (KMP) instead of kotlin.jvm.Volatile (JVM-only) via explicit
  import. Volatile semantics preserved on every target.

NestViewModel.kt also uses @Volatile (and the nestsClient project
dep); that file moves to jvmAndroid in a separate PR as planned
(audio rooms is Phase 5).
2026-05-24 23:06:30 +00:00
..