@@ -129,10 +129,10 @@ class HomeFragmentModel(view: HomeFragmentView) : ParentModel<HomeFragmentView>(
129129 /* *
130130 * 获取设备在线状态
131131 */
132- private fun getDeviceOnlineStatus (index : Int , size : Int ) {
132+ private fun getDeviceOnlineStatus (index : Int ) {
133133 var productId = " "
134134 val deviceIds = arrayListOf<String >()
135- for (i in index until size) {
135+ for (i in index until deviceList. size) {
136136 App .data.deviceList[i].let {
137137 if (TextUtils .isEmpty(productId)) {
138138 productId = it.ProductId
@@ -150,7 +150,7 @@ class HomeFragmentModel(view: HomeFragmentView) : ParentModel<HomeFragmentView>(
150150 if (response.isSuccess()) {
151151 response.parse(DeviceOnlineResponse ::class .java)?.run {
152152 if (! DeviceStatuses .isNullOrEmpty()) {
153- for (i in index until size) {
153+ for (i in index until deviceList. size) {
154154 deviceList[i].run {
155155 run check@{
156156 DeviceStatuses !! .forEach {
@@ -273,10 +273,7 @@ class HomeFragmentModel(view: HomeFragmentView) : ParentModel<HomeFragmentView>(
273273 refreshShareDeviceList()
274274 }
275275 // 在线状态
276- getDeviceOnlineStatus(
277- deviceList.size - DeviceList .size,
278- deviceList.size
279- )
276+ getDeviceOnlineStatus(deviceList.size - DeviceList .size)
280277 }
281278 }
282279 }
@@ -302,10 +299,7 @@ class HomeFragmentModel(view: HomeFragmentView) : ParentModel<HomeFragmentView>(
302299 shareDeviceListEnd
303300 )
304301 // 在线状态
305- getDeviceOnlineStatus(
306- deviceList.size - ShareDevices .size,
307- deviceList.size
308- )
302+ getDeviceOnlineStatus(deviceList.size - ShareDevices .size)
309303 }
310304 }
311305 }
0 commit comments