Your Android phone and your Windows PC, working as one. Local-first, end-to-end encrypted, no account.
Android: start the core's node once, even when asked twice at once
Bee7f52e4562276
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 50b2e5a..0180323 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -17,6 +17,11 @@ change things that need a step from you, and its notes say so.### Fixed+- **Far fewer disconnects.** As the phone app opened, two of its startup+ calls could race and start the phone's connection twice, with one+ identity. The two took the PC from each other every few seconds: windows+ and mirroring dropped or couldn't start, and the PC showed the phone+ connecting over and over. It now starts once.- **Windows 10.** NectarLink and its installer start on Windows 10 again. Theyfailed right away with "Entry Point Not Found" because the Windows 11-onlyvirtual camera was required at startup. On Windows 10, everything worksdiff --git a/android/app/src/main/kotlin/app/nectarlink/android/core/Core.kt b/android/app/src/main/kotlin/app/nectarlink/android/core/Core.ktindex 158c4d9..486f0e8 100644--- a/android/app/src/main/kotlin/app/nectarlink/android/core/Core.kt+++ b/android/app/src/main/kotlin/app/nectarlink/android/core/Core.kt@@ -318,7 +318,12 @@ class Core(context: Context, private val scope: CoroutineScope) : EventListener)val pcMirrorPackets: SharedFlow<PcMirrorPacket> = _pcMirrorPackets.asSharedFlow()- /** Starts the node (once). Safe to call repeatedly. */+ /**+ * Starts the node (once). Safe to call repeatedly, from any thread: the+ * app calls it twice as it opens, and two calls at once used to start+ * two nodes with one identity, which kept taking the PC from each other.+ */+ @Synchronizedfun start() {if (startJob != null) returnstartJob = scope.launch(Dispatchers.IO) {