消息通知逻辑

This commit is contained in:
Caiyanpeng committed 2022-01-26 10:53:11 +08:00
1 parent 28487b295b
commit 5edd784080
5 files changed
+37 -10

No files matched your search

+22 -7
View File
@@ -622,12 +622,21 @@ public class LoginController : BaseScene
//#endif
App.notifyContent = r.data.Value<string>("Content");
if (r.data.Value<int>("Id") != notifyId && r.data.Value<int>("Id") != 0)//r.data.Value<int>("Id") != notifyId
if (r.data.Value<int>("Id") > 1)//r.data.Value<int>("Id") != notifyId
{
UIManager.ShowNewsModal();
PlayerPrefs.SetInt("notifyId", r.data.Value<int>("Id"));
}
#else
if (r.data.Value<int>("Id") > 1)
{
App.notifyContent = r.data.Value<string>("Content");
UIManager.ShowNewsModal();
}
else
{
App.notifyContent = null;
}
var rr = await ConfigHelper.userApi.GetVersions();
if (rr.result)
{
@@ -643,18 +652,24 @@ public class LoginController : BaseScene
if (ver.UpdateLog.Count + 1 != notifyId) //ver.UpdateLog.Count != notifyId
{
var log = ver.UpdateLog.FirstOrDefault();
if (log != null)
if (App.notifyContent == null)
{
App.notifyContent = log.Desc;
if (log != null)
{
App.notifyContent = log.Desc;
}
else
{
App.notifyContent = r.data.Value<string>("Content");
}
UIManager.ShowNewsModal();
}
else
else
{
App.notifyContent = r.data.Value<string>("Content");
App.multiNotifyContent.Enqueue(log != null ? log.Desc : r.data.Value<string>("Content"));
}
PlayerPrefs.SetInt("notifyId", ver.UpdateLog.Count + 1);
UIManager.ShowNewsModal();
}
#endif
}
GetRotateImage();