Commit d627d27c435bb44e500e2bcf3263f75b3f9eb424
1 parent
b2f895d8
1 修改删除设备逻辑
Showing
3 changed files
with
4 additions
and
3 deletions
config.gradle
module_xiaojiaSoundBox/src/main/java/com/cnlive/strike/xiaojiaspeaker/frame/presenter/DeviceManagerFragmentPresenter.java
| @@ -26,13 +26,14 @@ import java.util.Map; | @@ -26,13 +26,14 @@ import java.util.Map; | ||
| 26 | import io.reactivex.disposables.Disposable; | 26 | import io.reactivex.disposables.Disposable; |
| 27 | 27 | ||
| 28 | public class DeviceManagerFragmentPresenter extends MvpBasePresenter<DeviceManagerFragmentView> { | 28 | public class DeviceManagerFragmentPresenter extends MvpBasePresenter<DeviceManagerFragmentView> { |
| 29 | - public void deleteDevice(Context context, String deviceId) { | 29 | + public void deleteDevice(Context context, String deviceId,String oldName) { |
| 30 | if (null == getView()) { | 30 | if (null == getView()) { |
| 31 | return; | 31 | return; |
| 32 | } | 32 | } |
| 33 | QMUITipDialogUtil.loadingDialog(context, "请稍后", false); | 33 | QMUITipDialogUtil.loadingDialog(context, "请稍后", false); |
| 34 | Map<String, String> map = new HashMap<>(); | 34 | Map<String, String> map = new HashMap<>(); |
| 35 | map.put("devId", deviceId); | 35 | map.put("devId", deviceId); |
| 36 | + map.put("oldName", oldName); | ||
| 36 | 37 | ||
| 37 | Logic.create(map) | 38 | Logic.create(map) |
| 38 | .action(new Logic.Action<Map<String, String>, APIBaseInfo>() { | 39 | .action(new Logic.Action<Map<String, String>, APIBaseInfo>() { |
module_xiaojiaSoundBox/src/main/java/com/cnlive/strike/xiaojiaspeaker/frame/view/DeviceManagerFragmentView.java
| @@ -143,7 +143,7 @@ public class DeviceManagerFragmentView implements MvpView { | @@ -143,7 +143,7 @@ public class DeviceManagerFragmentView implements MvpView { | ||
| 143 | dialog.dismiss(); | 143 | dialog.dismiss(); |
| 144 | if (null != deviceDetail) { | 144 | if (null != deviceDetail) { |
| 145 | if (!TextUtils.isEmpty(deviceDetail.getSN())) { | 145 | if (!TextUtils.isEmpty(deviceDetail.getSN())) { |
| 146 | - fragment.getPresenter().deleteDevice(getContext(), deviceDetail.getSN()); | 146 | + fragment.getPresenter().deleteDevice(getContext(), deviceDetail.getSN(),deviceDetail.getDeviceName()); |
| 147 | } | 147 | } |
| 148 | } else { | 148 | } else { |
| 149 | AlertUtil.showDeftToast(getContext(), "删除失败"); | 149 | AlertUtil.showDeftToast(getContext(), "删除失败"); |