Jelajahi Sumber

1. 홈허브 검색 버그 수정.

aaron 8 tahun lalu
induk
melakukan
10af3eb629

+ 1 - 1
onecable_admin/src/main/java/com/ntels/onecable/admin/view/install/FragmentInstall.java

@@ -461,7 +461,7 @@ public class FragmentInstall extends Fragment implements View.OnClickListener,
                 intent.putExtra(Constants.EXTRA_DEVICE_ID, deviceId);
                 mUtil.callActivityForResultNoAnim(mActivity, intent, Constants.ACT_INSTALL_HOMEHUB_DEL);
             } else {
-                if (deviceOnline.equals("ON")&&deviceConn.equals("connect")) {
+                if (deviceOnline.equals("ON") && deviceConn.equals("connect")) {
                     mIntent = new Intent(mActivity, ThingsDeviceDelStep0.class);
                 } else {
                     mIntent = new Intent(mActivity, ThingsDeviceDelOffStep1.class);

+ 11 - 0
onecable_admin/src/main/java/com/ntels/onecable/admin/view/install/HomehubRegister.java

@@ -533,6 +533,8 @@ public class HomehubRegister extends CustomActivity implements View.OnClickListe
 //                        mUtil.getView(mActivity, R.id.width_section).setVisibility(View.VISIBLE);
                     }
                     mHomehubRegisterAdapter.notifyDataSetChanged();
+                } else {
+                    mHomehubRegisterAdapter.removeItem(index);
                 }
             } else {
                 JSONObject joResult = new JSONObject(result.getContent());
@@ -723,6 +725,15 @@ public class HomehubRegister extends CustomActivity implements View.OnClickListe
             sendGetDeviceRegistState(item, iposition);
         }
 
+        /**
+         * index에 해당하는 디바이스를 삭제(ex> status가 E2(이미 나에게 등록된 홈허브)인 디바이스 삭제).
+         *
+         * @param index 삭제할 디바이스 index
+         */
+        public void removeItem(int index) {
+            mHomehubList.remove(index);
+        }
+
         /**
          * 홈허브 리스트 초기화.
          */