From 979d9cff22806f213b420452ab4a68fcbaf021b6 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 31 五月 2021 17:43:49 +0800
Subject: [PATCH] 1. 修复多项可能引起空指针崩溃的bug; 2. 新建子任务时默认执行人员从全体人员改为当前用户; 3. 新建子任务时默认执行时间强制固定为总任务对应的时段内,确保子任务执行时间不会超出总任务范围。

---
 app/src/main/java/cn/flightfeather/thirdapp/fragment/SettingFragment.java |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/app/src/main/java/cn/flightfeather/thirdapp/fragment/SettingFragment.java b/app/src/main/java/cn/flightfeather/thirdapp/fragment/SettingFragment.java
index d204f63..a549044 100644
--- a/app/src/main/java/cn/flightfeather/thirdapp/fragment/SettingFragment.java
+++ b/app/src/main/java/cn/flightfeather/thirdapp/fragment/SettingFragment.java
@@ -18,9 +18,10 @@
 import cn.flightfeather.thirdapp.CommonApplication;
 import cn.flightfeather.thirdapp.R;
 import cn.flightfeather.thirdapp.activity.LoginActivity;
-import cn.flightfeather.thirdapp.bean.Userinfo;
+import cn.flightfeather.thirdapp.bean.entity.Userinfo;
 import cn.flightfeather.thirdapp.httpservice.SettingsService;
 import cn.flightfeather.thirdapp.util.GlobalConfig;
+import cn.flightfeather.thirdapp.util.push.LoginInitializer;
 import cn.flightfeather.thirdapp.view.SettingCommItemView;
 import okhttp3.ResponseBody;
 import retrofit2.Call;
@@ -59,7 +60,7 @@
         tv_userName = (TextView) view.findViewById(R.id.tv_user_name);
         tv_userName.setText(application.getCurrentUser().getRealname());
         text_version = view.findViewById(R.id.text_version);
-        text_version.setText(GlobalConfig.getInstance().getVersionName());
+        text_version.setText(GlobalConfig.Companion.getInstance().getVersionName());
         sc_changePassword = (SettingCommItemView) view.findViewById(R.id.sc_edit_password);
         sc_logOut = (SettingCommItemView) view.findViewById(R.id.sc_logout);
 
@@ -73,6 +74,8 @@
         dialog.setPositiveButton("纭畾", new DialogInterface.OnClickListener() {
             @Override
             public void onClick(DialogInterface dialogInterface, int i) {
+                LoginInitializer.INSTANCE.onLoginStatusCheck(getContext(), false, application.getCurrentUser().getAcountname());
+
                 Intent intent = new Intent(getActivity(), LoginActivity.class);
                 startActivity(intent);
                 getActivity().finish();

--
Gitblit v1.9.3