mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-16 16:47:24 +00:00
fix: Fix pairing same devices (#10856)
This commit is contained in:
parent
91bdb5824b
commit
b565b56aff
@ -1,4 +1,4 @@
|
||||
import json, tables
|
||||
import json, tables, chronicles
|
||||
import base
|
||||
import ../../../../app_service/service/accounts/dto/accounts
|
||||
import ../../../../app_service/service/devices/dto/installation
|
||||
@ -21,6 +21,7 @@ proc fromEvent*(T: type LocalPairingSignal, event: JsonNode): LocalPairingSignal
|
||||
result.action = e["action"].getInt().parse()
|
||||
if e.contains("error"):
|
||||
result.error = e["error"].getStr()
|
||||
debug "local pairing event", `type` = result.eventType, action = result.action, error = result.error, event = $event
|
||||
if not e.contains("data"):
|
||||
return
|
||||
case result.eventType:
|
||||
|
@ -1,4 +1,4 @@
|
||||
import NimQml, Tables, sequtils
|
||||
import NimQml, Tables, sequtils, chronicles
|
||||
import item
|
||||
import ../../../../../app_service/service/devices/dto/[installation]
|
||||
|
||||
@ -113,7 +113,15 @@ QtObject:
|
||||
defer: index.delete
|
||||
|
||||
self.items[i].installation = installation
|
||||
self.dataChanged(index, index, @[])
|
||||
self.dataChanged(index, index, @[
|
||||
ModelRole.Identity.int,
|
||||
ModelRole.Version.int,
|
||||
ModelRole.Enabled.int,
|
||||
ModelRole.Timestamp.int,
|
||||
ModelRole.Name.int,
|
||||
ModelRole.DeviceType.int,
|
||||
ModelRole.FcmToken.int,
|
||||
])
|
||||
|
||||
proc updateItemName*(self: Model, installationId: string, name: string) =
|
||||
var i = self.findIndexByInstallationId(installationId)
|
||||
|
@ -188,6 +188,7 @@ QtObject:
|
||||
"timeout": 5 * 60 * 1000,
|
||||
}
|
||||
}
|
||||
self.localPairingStatus.reset()
|
||||
self.localPairingStatus.mode = LocalPairingMode.Sender
|
||||
return status_go.getConnectionStringForBootstrappingAnotherDevice($configJSON)
|
||||
|
||||
@ -204,6 +205,7 @@ QtObject:
|
||||
},
|
||||
"clientConfig": %* {}
|
||||
}
|
||||
self.localPairingStatus.reset()
|
||||
self.localPairingStatus.mode = LocalPairingMode.Receiver
|
||||
|
||||
let arg = AsyncInputConnectionStringArg(
|
||||
|
Loading…
x
Reference in New Issue
Block a user