Skip to content

Commit

Permalink
修复“控制面板中出现重复的属性”的问题
Browse files Browse the repository at this point in the history
Change-Id: Iee6189afd106c3538d44411a8326e40557f5df73
  • Loading branch information
archurcode committed Dec 4, 2020
1 parent 06c0a79 commit 2e7de3a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import com.tencent.iot.explorer.link.mvp.ParentModel
import com.tencent.iot.explorer.link.mvp.view.ControlPanelView
import java.util.*
import kotlin.collections.ArrayList
import kotlin.collections.LinkedHashSet


/**
Expand Down Expand Up @@ -55,7 +56,7 @@ class ControlPanelModel(view: ControlPanelView) : ParentModel<ControlPanelView>(
private val deviceDataList = arrayListOf<DeviceDataEntity>()

//设备产品信息及面板数据
val devicePropertyList = LinkedList<DevicePropertyEntity>()
var devicePropertyList = LinkedList<DevicePropertyEntity>()

//是否显示导航栏
private var navBar: NavBar? = null
Expand Down Expand Up @@ -325,6 +326,7 @@ class ControlPanelModel(view: ControlPanelView) : ParentModel<ControlPanelView>(
devicePropertyList.add(devicePropertyEntity)
}
}
devicePropertyList = LinkedList(LinkedHashSet(devicePropertyList))
L.e("devicePropertyList", JsonManager.toJson(devicePropertyList) ?: "")
view?.showControlPanel(navBar, hasTimerCloud)
}
Expand Down

0 comments on commit 2e7de3a

Please sign in to comment.