update: 更新 Model 引用, 防止报空
							parent
							
								
									86742abe46
								
							
						
					
					
						commit
						9d907463ee
					
				| 
						 | 
					@ -1247,7 +1247,7 @@ namespace Guru
 | 
				
			||||||
                return;
 | 
					                return;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (_model.event_priorities == null) _model.event_priorities = new Dictionary<string, int>(10);
 | 
					            if (Model.event_priorities == null) Model.event_priorities = new Dictionary<string, int>(10);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            int i = 0;
 | 
					            int i = 0;
 | 
				
			||||||
            string evt = "";
 | 
					            string evt = "";
 | 
				
			||||||
| 
						 | 
					@ -1256,7 +1256,7 @@ namespace Guru
 | 
				
			||||||
                evt = eventNames[i];
 | 
					                evt = eventNames[i];
 | 
				
			||||||
                if (!string.IsNullOrEmpty(evt))
 | 
					                if (!string.IsNullOrEmpty(evt))
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    _model.event_priorities[evt] = (int)priority;
 | 
					                    Model.event_priorities[evt] = (int)priority;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                i++;
 | 
					                i++;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					@ -1275,8 +1275,8 @@ namespace Guru
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static EventPriority GetEventPriority(string eventName)
 | 
					        public static EventPriority GetEventPriority(string eventName)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            if (_model.event_priorities != null 
 | 
					            if (Model.event_priorities != null 
 | 
				
			||||||
                && _model.event_priorities.TryGetValue(eventName, out int p))
 | 
					                && Model.event_priorities.TryGetValue(eventName, out int p))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                return (EventPriority)p;
 | 
					                return (EventPriority)p;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,8 +3,8 @@ namespace Guru
 | 
				
			||||||
    public partial class GuruSDK
 | 
					    public partial class GuruSDK
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        public static string UID => _model?.UserId ?? IPMConfig.IPM_UID;
 | 
					        public static string UID => Model?.UserId ?? IPMConfig.IPM_UID;
 | 
				
			||||||
        public static string UUID => _model?.UserId ?? IPMConfig.IPM_UUID;
 | 
					        public static string UUID => Model?.UserId ?? IPMConfig.IPM_UUID;
 | 
				
			||||||
        public static string DeviceId => IPMConfig.IPM_DEVICE_ID ?? "";  // TODO: change it to _model member later.
 | 
					        public static string DeviceId => IPMConfig.IPM_DEVICE_ID ?? "";  // TODO: change it to _model member later.
 | 
				
			||||||
        public static string PushToken => IPMConfig.IPM_PUSH_TOKEN ?? ""; // TODO: change it to _model member later.
 | 
					        public static string PushToken => IPMConfig.IPM_PUSH_TOKEN ?? ""; // TODO: change it to _model member later.
 | 
				
			||||||
        public static string AuthToken => IPMConfig.IPM_TOKEN ?? ""; // TODO: change it to _model member later.
 | 
					        public static string AuthToken => IPMConfig.IPM_TOKEN ?? ""; // TODO: change it to _model member later.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -34,8 +34,6 @@ namespace Guru
 | 
				
			||||||
        private GuruSDKInitConfig _initConfig;
 | 
					        private GuruSDKInitConfig _initConfig;
 | 
				
			||||||
        private Action<bool> _onCompleteCallback;
 | 
					        private Action<bool> _onCompleteCallback;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        private static GuruSDKModel _model;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        internal static GuruSDKInitConfig InitConfig => Instance._initConfig;
 | 
					        internal static GuruSDKInitConfig InitConfig => Instance._initConfig;
 | 
				
			||||||
        internal static GuruSDKModel Model => GuruSDKModel.Instance;
 | 
					        internal static GuruSDKModel Model => GuruSDKModel.Instance;
 | 
				
			||||||
        private static GuruServicesConfig _appServicesConfig;
 | 
					        private static GuruServicesConfig _appServicesConfig;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue