Compare commits

..

No commits in common. "b305fd3ab8c2de18c41a3fd34b06eba88fb769e5" and "567d1ff812f97babcf5e2340eb6a6773a399fc35" have entirely different histories.

1 changed files with 11 additions and 15 deletions

View File

@ -1,9 +1,8 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using AdjustSdk; using AdjustSdk;
using Newtonsoft.Json; using Newtonsoft.Json;
using UnityEngine;
using WZ; using WZ;
using Random = UnityEngine.Random;
public class AdjustTrackEvent : D_MonoSingleton<AdjustTrackEvent> public class AdjustTrackEvent : D_MonoSingleton<AdjustTrackEvent>
{ {
@ -22,29 +21,26 @@ public class AdjustTrackEvent : D_MonoSingleton<AdjustTrackEvent>
return null; return null;
} }
return eventTokenMap.GetValueOrDefault(eventName.ToLower(), null); return eventTokenMap.GetValueOrDefault(eventName, null);
} }
public void UpdateEventToken() public void UpdateEventToken()
{ {
var remoteConfigString = FireBaseRemoteConfigManager.Instance.GetRemoteConfigString("event_adjust_set"); var remoteConfigString = FireBaseRemoteConfigManager.Instance.GetRemoteConfigString("event_adjust_set");
if (string.IsNullOrEmpty(remoteConfigString)) return; if (string.IsNullOrEmpty(remoteConfigString)) return;
try var deserializeObject = JsonConvert.DeserializeObject<Dictionary<string, string>>(remoteConfigString);
if (eventTokenMap == null)
{
eventTokenMap = deserializeObject;
}
else
{ {
var deserializeObject = JsonConvert.DeserializeObject<Dictionary<string, string>>(remoteConfigString);
eventTokenMap ??= new Dictionary<string, string>();
foreach (var keyValuePair in deserializeObject) foreach (var keyValuePair in deserializeObject)
{ {
eventTokenMap[keyValuePair.Key.ToLower()] = keyValuePair.Value; eventTokenMap[keyValuePair.Key] = keyValuePair.Value;
} }
} }
catch (Exception e)
{
LoggerUtils.Error("event_adjust_set 转化失败");
}
} }
/// <summary> /// <summary>