update: 修复自打点Ready状态判定标志位

Signed-off-by: huyufei <yufei.hu@castbox.fm>
胡宇飞 2024-08-01 18:11:22 +08:00
parent c8b85b0f79
commit c73aa0cd96
2 changed files with 5 additions and 4 deletions

View File

@ -32,9 +32,9 @@ namespace Guru
}
private bool _isReady = false;
private static bool _isReady = false;
public bool IsReady => _isReady;
public static bool IsReady => _isReady;
private IAnalyticsAgent _agent;
private IAnalyticsAgent Agent
@ -139,8 +139,8 @@ namespace Guru
#endif
_instance.EnableErrorLog = enableErrorLog;
_instance._isReady = true;
_instance._experimentGroupId = groupId;
_isReady = true;
}
}

View File

@ -118,7 +118,8 @@ namespace Guru
}
Log.I(TAG,$"SetCurrentScreen -> screenName:{screenName}, className:{className}");
GuruAnalytics.Instance.SetScreen(screenName);
if(GuruAnalytics.IsReady)
GuruAnalytics.Instance.SetScreen(screenName);
TrackEvent(EventScreenView, new Dictionary<string, dynamic>()
{