update:更新Model 内 FirstOpenTime 的时间获取
							parent
							
								
									149bc438ac
								
							
						
					
					
						commit
						5c3be01eb3
					
				|  | @ -31,7 +31,7 @@ namespace Guru | |||
|         public int b_play = 0; | ||||
|         public int buy_count = 0; | ||||
|         public bool no_ads = false; | ||||
|         public string first_open_time = GetFirstOpenTime(); | ||||
|         public string first_open_time = ""; | ||||
|          | ||||
|         public List<PurchasedProduct> purchased; | ||||
| 
 | ||||
|  | @ -97,7 +97,15 @@ namespace Guru | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         public string FirstOpenTime => first_open_time; | ||||
|         public string FirstOpenTime | ||||
|         { | ||||
|             get => first_open_time; | ||||
|             set | ||||
|             { | ||||
|                 first_open_time = value; | ||||
|                 Save(); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         public bool IsIapUser => PurchasedCount > 0; | ||||
|          | ||||
|  |  | |||
|  | @ -395,6 +395,11 @@ namespace Guru | |||
| 
 | ||||
|         public static void SetFirstOpenTime(string timestamp) | ||||
|         { | ||||
|             if (string.IsNullOrEmpty(timestamp)) | ||||
|             { | ||||
|                 timestamp = IPMConfig.FIRST_OPEN_TIME; | ||||
|                 Model.FirstOpenTime = timestamp; | ||||
|             } | ||||
|             SetUserProperty(Analytics.PropertyFirstOpenTime, timestamp); | ||||
|         } | ||||
|          | ||||
|  | @ -431,7 +436,7 @@ namespace Guru | |||
|             if (_hasUserPropertiesInitiallyUpdated) return; | ||||
|             _hasUserPropertiesInitiallyUpdated = true; | ||||
|              | ||||
|             SetFirstOpenTime(Model?.FirstOpenTime ?? GuruSDKModel.GetFirstOpenTime());    //  first_open_time  | ||||
|             SetFirstOpenTime(Model?.FirstOpenTime ?? "");    //  first_open_time  | ||||
|             SetUserIsIAP(Model?.IsIapUser ?? false);    // is_iap_user | ||||
|             SetUserBLevel(Model?.SuccessLevelId ?? 0);  // b_level | ||||
|             SetUserBLevel(Model?.TotalPlayedCount ?? 0); // b_play | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue