From bb6ad792b598927a5459a5fb6f6c27fb1aa9e94e Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 17 十二月 2020 14:06:36 +0800
Subject: [PATCH] 20201217-1

---
 HDL-ON_iOS/AppDelegate.cs |   27 +++++++++++++++------------
 1 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs
index 860b509..437d7e3 100644
--- a/HDL-ON_iOS/AppDelegate.cs
+++ b/HDL-ON_iOS/AppDelegate.cs
@@ -99,18 +99,23 @@
 
                 // Save new device token 
                 NSUserDefaults.StandardUserDefaults.SetString(DeviceToken, "PushDeviceToken");
-                string userPhoneName = UIDevice.CurrentDevice.Name;
 
-                UserInfo.Current.PushDeviceToken = DeviceToken;
-                UserInfo.Current.PhoneName = userPhoneName;
-                UserInfo.Current.SaveUserInfo();
+                //UserInfo.Current.PushDeviceToken = DeviceToken;
+                //UserInfo.Current.PhoneName = userPhoneName;
+                //UserInfo.Current.SaveUserInfo();
+                OnAppConfig.Instance.PushDeviceToken = DeviceToken;
+                OnAppConfig.Instance.PhoneName = UIDevice.CurrentDevice.Name;
+                OnAppConfig.Instance.SaveConfig();
             }
-            if (UserInfo.Current.PushDeviceToken != DeviceToken)
+            if (OnAppConfig.Instance.PushDeviceToken != DeviceToken)
             {
-                string userPhoneName = UIDevice.CurrentDevice.Name;
-                UserInfo.Current.PushDeviceToken = DeviceToken;
-                UserInfo.Current.PhoneName = userPhoneName;
-                UserInfo.Current.SaveUserInfo();
+                //string userPhoneName = UIDevice.CurrentDevice.Name;
+                //UserInfo.Current.PushDeviceToken = DeviceToken;
+                //UserInfo.Current.PhoneName = userPhoneName;
+                //UserInfo.Current.SaveUserInfo();
+                OnAppConfig.Instance.PushDeviceToken = DeviceToken;
+                OnAppConfig.Instance.PhoneName = UIDevice.CurrentDevice.Name;
+                OnAppConfig.Instance.SaveConfig();
             }
         }
 
@@ -165,7 +170,7 @@
         public override void OnResignActivation(UIApplication application)
         {
             Console.WriteLine("OnResignActivation");
-            OnAppConfig.Instance.unlockTime = DateTime.Now;
+            UserInfo.Current.unlockTime = DateTime.Now;
             HDL_ON.DriverLayer.UdpSocket._BusSocket.Stop();
         }
 
@@ -216,8 +221,6 @@
             Shared.Application.IsEditTextContentTypePassword = false;
             //榛樿浣跨敤鑻规柟瀛椾綋
             Shared.Application.IsUsePingFang = true;
-            ////榛樿绂佹闊充箰鏈嶅姟
-            //Shared.Application.IsMusicEnable = false;
             //淇濇寔灞忓箷甯镐寒鎴栬�呰嚜鍔ㄩ攣灞�
             application.IdleTimerDisabled = false;
 

--
Gitblit v1.8.0