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 | 26 | import io.reactivex.disposables.Disposable; |
| 27 | 27 | |
| 28 | 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 | 30 | if (null == getView()) { |
| 31 | 31 | return; |
| 32 | 32 | } |
| 33 | 33 | QMUITipDialogUtil.loadingDialog(context, "请稍后", false); |
| 34 | 34 | Map<String, String> map = new HashMap<>(); |
| 35 | 35 | map.put("devId", deviceId); |
| 36 | + map.put("oldName", oldName); | |
| 36 | 37 | |
| 37 | 38 | Logic.create(map) |
| 38 | 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 | 143 | dialog.dismiss(); |
| 144 | 144 | if (null != deviceDetail) { |
| 145 | 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 | 148 | } else { |
| 149 | 149 | AlertUtil.showDeftToast(getContext(), "删除失败"); | ... | ... |