From d311d7f4da4538481938389cc5f2d37c62de3ef3 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期三, 16 十二月 2020 10:32:56 +0800 Subject: [PATCH] 2020-12-16 1.解决iOS打开App中断手机音乐播放问题。2.增加长按信息中心全部按钮,复制提取推送ID方便测试推送。 --- HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs | 61 ++++++++++++++++++++++++++++-- 1 files changed, 57 insertions(+), 4 deletions(-) diff --git a/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs b/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs index d398b7e..4f8def7 100644 --- a/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs +++ b/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs @@ -4,7 +4,9 @@ using System.Collections.Generic; using System.Threading; using HDL_ON.DAL.Server; - +#if DEBUG +using Xamarin.Essentials; +#endif namespace HDL_ON.UI { /// <summary> @@ -43,6 +45,12 @@ List<PushMessageInfo> PushMessageInfoList = new List<PushMessageInfo>(); + public override void RemoveFromParent() + { + UnregisterGetPushMessageAction(); + base.RemoveFromParent(); + } + /// <summary> /// /// </summary> @@ -63,7 +71,7 @@ AddTopMenuView(); AddMessageView(); MenuButtonSelect(showMesType); - + RegisterGetPushMessageAction(); //娴嬭瘯浠g爜 //AddEmptyTipView(); //TestLoad(); @@ -99,6 +107,14 @@ MenuButtonSelect(0); }; allMenuButton.SelectAction = allAction; + +#if DEBUG + //娴嬭瘯鎻愬墠褰撳墠鎺ㄩ�両D + allMenuButton.ImageButton.MouseLongEventHandler = (sender, e) => + { + CopyToClipboard("鎺ㄩ�両D锛�" + OnAppConfig.Instance.PushId); + }; +#endif #endregion #region 鍒嗕韩涓庡姛鑳� @@ -426,7 +442,8 @@ bodyScrolView.RemoveAll(); PushMessageInfoList.Clear(); YearMark = "";//鏍囪娓呯┖ - if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) { + if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) + { AddEmptyTipView(); return; } @@ -590,7 +607,8 @@ /// <summary> /// 鏍囪鎵�鏈夋帹閫佹秷鎭凡璇� /// </summary> - void PushSerivceMarkAllMessageRead() { + void PushSerivceMarkAllMessageRead() + { new Thread(() => { var result = new HttpServerRequest().PushSerivceMarkAllMessageRead(); @@ -608,6 +626,41 @@ { IsBackground = true }.Start(); } + /// <summary> + /// 娉ㄥ唽鏀跺埌鎺ㄩ�佺洃鍚� + /// </summary> + void RegisterGetPushMessageAction() + { + //HDLCommon.GetPushMessageAction = () => + //{ + // if (bodyView != null) + // { + // Utlis.WriteLine("GetPushMessageAction M鏀跺埌鎺ㄩ��"); + // GetPushMessageList(showMesType); + // } + //}; + } + + /// <summary> + /// 鍙栨秷鏀跺埌鎺ㄩ�佺洃鍚� + /// </summary> + void UnregisterGetPushMessageAction() + { + //HDLCommon.GetPushMessageAction = null; + } + +#if DEBUG + + /// <summary> + /// 澶嶅埗鍒板壀鍒囨澘 + /// </summary> + /// <param name="text"></param> + void CopyToClipboard(string text) + { + Clipboard.SetTextAsync(text); + Utlis.ShowTip(text + "\n" + Language.StringByID(StringId.CopySuccess)); + } +#endif } -- Gitblit v1.8.0