Fix for repeated
This commit is contained in:
1 parent
b135ba2a0a
commit
eec4101d29
2 files changed
+23
-1
No files matched your search
+3
-1
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
- Nothing worth mentioning yet.
|
### Fixed
|
||||||
|
|
||||||
|
- `Device connected` notification showing repeatedly
|
||||||
|
|
||||||
## [0.20.0] - 2024-02-21
|
## [0.20.0] - 2024-02-21
|
||||||
|
|
||||||
|
|||||||
@@ -339,6 +339,9 @@ class LoungeApi
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
for each device in devices
|
for each device in devices
|
||||||
|
if m.devices.DoesExist(device.id)
|
||||||
|
device.lastConnectEventType = m.devices[device.id].lastConnectEventType
|
||||||
|
end if
|
||||||
m.devices[device.id] = device
|
m.devices[device.id] = device
|
||||||
end for
|
end for
|
||||||
end function
|
end function
|
||||||
@@ -359,6 +362,12 @@ class LoungeApi
|
|||||||
|
|
||||||
m.devices[id] = newDevice
|
m.devices[id] = newDevice
|
||||||
|
|
||||||
|
if ValidString(newDevice.lastConnectEventType) = commandType
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
newDevice.lastConnectEventType = commandType
|
||||||
|
|
||||||
userName = newDevice.user
|
userName = newDevice.user
|
||||||
deviceName = newDevice.name
|
deviceName = newDevice.name
|
||||||
userAvatarUri = newDevice.userAvatarUri
|
userAvatarUri = newDevice.userAvatarUri
|
||||||
@@ -368,6 +377,17 @@ class LoungeApi
|
|||||||
|
|
||||||
function HandleRemoteDisconnected(commandId as integer, commandType as string, commandArgs as object, messagesToSend as object) as void
|
function HandleRemoteDisconnected(commandId as integer, commandType as string, commandArgs as object, messagesToSend as object) as void
|
||||||
LogInfo(commandType, FormatJson(commandArgs))
|
LogInfo(commandType, FormatJson(commandArgs))
|
||||||
|
newDevice = commandArgs
|
||||||
|
id = newDevice.id
|
||||||
|
if StringUtils.IsNullOrEmpty(id)
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
if not m.devices.DoesExist(id)
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
m.devices[id].lastConnectEventType = commandType
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function HandleSetVolume(commandId as integer, commandType as string, commandArgs as object, messagesToSend as object) as void
|
function HandleSetVolume(commandId as integer, commandType as string, commandArgs as object, messagesToSend as object) as void
|
||||||
|
|||||||
Reference in new issue
Block a user