update: 去掉 DevicesInfo 发送限制

Signed-off-by: huyufei <yufei.hu@castbox.fm>
胡宇飞 2024-09-05 21:01:58 +08:00
parent 1065da73d2
commit 727da50625
2 changed files with 7 additions and 4 deletions

View File

@ -37,7 +37,6 @@ namespace Guru
FirebaseMessaging.TokenReceived += OnTokenReceived; FirebaseMessaging.TokenReceived += OnTokenReceived;
FirebaseMessaging.MessageReceived += OnMessageReceived; FirebaseMessaging.MessageReceived += OnMessageReceived;
DelayGetFCMToken(0); DelayGetFCMToken(0);
} }
@ -124,12 +123,16 @@ namespace Guru
} }
else else
{ {
Debug.Log($"[Firebase] --- UploadDeviceInfo ---"); Debug.Log($"{LOG_TAG} --- UploadDeviceInfo ---");
//延时重试 //延时重试
new DeviceInfoUploadRequest() new DeviceInfoUploadRequest()
.SetRetryTimes(1) .SetSuccessCallBack(() =>
{
Debug.Log($"{LOG_TAG} --- UploadDeviceInfo:Success");
})
.SetFailCallBack(() => .SetFailCallBack(() =>
{ {
Debug.Log($"{LOG_TAG} --- UploadDeviceInfo:failed");
double retryDelay = Math.Pow(2, _messageRetry); double retryDelay = Math.Pow(2, _messageRetry);
_messageRetry++; _messageRetry++;
CoroutineHelper.Instance.StartDelayed((float) retryDelay, UploadDeviceInfo); CoroutineHelper.Instance.StartDelayed((float) retryDelay, UploadDeviceInfo);

View File

@ -10,7 +10,7 @@ namespace Guru
public static partial class FirebaseUtil public static partial class FirebaseUtil
{ {
private static readonly string LOG_TAG = "Firebase"; private static readonly string LOG_TAG = "[Firebase]";
private static bool _isReady = false; private static bool _isReady = false;
public static bool IsReady => _isReady && IsFirebaseInitialized; public static bool IsReady => _isReady && IsFirebaseInitialized;