2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 13:47:41 +00:00

Also compare protocol version to consider device info needs saving

This commit is contained in:
Albert Vaca Cintora
2025-01-18 14:13:42 +01:00
parent 0560071cfb
commit b4ee6e30b1

View File

@@ -361,10 +361,11 @@ class Device : PacketReceiver {
fun updateDeviceInfo(newDeviceInfo: DeviceInfo): Boolean {
var hasChanges = false
if (deviceInfo.name != newDeviceInfo.name || deviceInfo.type != newDeviceInfo.type) {
if (deviceInfo.name != newDeviceInfo.name || deviceInfo.type != newDeviceInfo.type || deviceInfo.protocolVersion != newDeviceInfo.protocolVersion) {
hasChanges = true
deviceInfo.name = newDeviceInfo.name
deviceInfo.type = newDeviceInfo.type
deviceInfo.protocolVersion = newDeviceInfo.protocolVersion
if (isPaired) {
deviceInfo.saveInSettings(settings)
}