From ddcb280adeda3c18dfeeafed9cf52193f8aac413 Mon Sep 17 00:00:00 2001 From: phuoc Date: Fri, 3 May 2024 14:52:42 +0700 Subject: [PATCH] allow same ip for local Signed-off-by: phuoc --- lib/service/canvas_client_service.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/service/canvas_client_service.dart b/lib/service/canvas_client_service.dart index 63a220c55..1d4d15a0b 100644 --- a/lib/service/canvas_client_service.dart +++ b/lib/service/canvas_client_service.dart @@ -350,10 +350,10 @@ class CanvasClientService { final devices = []; final discoverDevices = await _mdnsService.findCanvas(); final localDevices = await _db.canvasDeviceDao.getCanvasDevices(); + localDevices.removeWhere((l) => discoverDevices.any((d) => d.ip == l.ip)); devices ..addAll(discoverDevices) - ..addAll(localDevices) - ..unique((element) => element.ip); + ..addAll(localDevices); return devices; }