Commit f3847fe2 authored by chenyuling's avatar chenyuling

"优化配置信息置空情况"

parent d2ea35d7
Pipeline #1624 canceled with stages
...@@ -24,6 +24,7 @@ import com.srthinker.statinfo.database.entity.ConfigEntity; ...@@ -24,6 +24,7 @@ import com.srthinker.statinfo.database.entity.ConfigEntity;
import com.srthinker.statinfo.database.helper.ConfigHelper; import com.srthinker.statinfo.database.helper.ConfigHelper;
import com.srthinker.statinfo.databinding.DialogConfigBinding; import com.srthinker.statinfo.databinding.DialogConfigBinding;
import com.srthinker.statinfo.listener.ConfigCallback; import com.srthinker.statinfo.listener.ConfigCallback;
import com.srthinker.statinfo.util.common.SharedUtil;
import com.srthinker.statinfo.util.common.Utils; import com.srthinker.statinfo.util.common.Utils;
import com.srthinker.statinfo.wedget.EditView; import com.srthinker.statinfo.wedget.EditView;
...@@ -146,6 +147,13 @@ public class ConfigDlgFragment extends DialogFragment { ...@@ -146,6 +147,13 @@ public class ConfigDlgFragment extends DialogFragment {
Utils.showTips(context,"请输入IP!"); Utils.showTips(context,"请输入IP!");
return; return;
} }
}else{
//清空配置信息的话,也需要清空连接状态
if (type==ENTER_TYPE){
SharedUtil.getInstance(context).writeShared("enter_connect",false);
}else if (type==LEAVE_TYPE){
SharedUtil.getInstance(context).writeShared("leave_connect",false);
}
} }
//List<ConfigBean> configBeanList = new ArrayList<>(); //List<ConfigBean> configBeanList = new ArrayList<>();
List<ConfigEntity> configEntities = new ArrayList<>(); List<ConfigEntity> configEntities = new ArrayList<>();
......
...@@ -434,6 +434,8 @@ public class SettingActivity extends BaseActivity implements ConfigCallback, Que ...@@ -434,6 +434,8 @@ public class SettingActivity extends BaseActivity implements ConfigCallback, Que
//表示更新了配置 //表示更新了配置
isModified = true; isModified = true;
SharedUtil.getInstance(this).writeShared("isModified",isModified); SharedUtil.getInstance(this).writeShared("isModified",isModified);
//更新连接状态
updateDeviceConnect();
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment