优化远程获取app设置
This commit is contained in:
@@ -2264,9 +2264,9 @@ public class NetInterfaceManager {
|
||||
Log.e("getAppTimeControlObserver", "onNext: ");
|
||||
if (listBaseResponse.code == 200) {
|
||||
List<AppTimeControl> appTimeControls = listBaseResponse.data;
|
||||
cacheHelper.put(UrlAddress.GET_SN_TIME_CONTROL, GsonUtils.toJSONString(appTimeControls));
|
||||
cacheHelper.put(UrlAddress.GET_APP_TIME_CONTROL, GsonUtils.toJSONString(appTimeControls));
|
||||
} else {
|
||||
cacheHelper.put(UrlAddress.GET_SN_TIME_CONTROL, "");
|
||||
cacheHelper.put(UrlAddress.GET_APP_TIME_CONTROL, "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -451,12 +451,22 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
|
||||
@Override
|
||||
public void getAppTimeControl() {
|
||||
mView.setAppTimeControl();
|
||||
NetInterfaceManager.getInstance().getAppTimeControl(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.setAppTimeControl();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSnTimeControl() {
|
||||
mView.setSnTimeControl();
|
||||
NetInterfaceManager.getInstance().getSnTimeControl(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.setSnTimeControl();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user