wxr
2020-12-16 343536d04f83c518043610ea297030b9c0ce029c
Merge branch 'CJL' into NewFilePath
8个文件已修改
102 ■■■■■ 已修改文件
DLL/Shared.IOS.dll 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Application.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/AppDelegate.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Info.plist 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/HDLCommon.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePage.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DLL/Shared.IOS.dll
Binary files differ
HDL-ON_Android/Application.cs
@@ -103,6 +103,7 @@
                //UserInfo.Current.unlockTime = DateTime.Now;
            };
            HDLUtils.SetAuthoritiesName("com.hdl.onpro.fileProvider");
HDL-ON_iOS/AppDelegate.cs
@@ -221,8 +221,6 @@
            Shared.Application.IsEditTextContentTypePassword = false;
            //默认使用苹方字体
            Shared.Application.IsUsePingFang = true;
            ////默认禁止音乐服务
            //Shared.Application.IsMusicEnable = false;
            //保持屏幕常亮或者自动锁屏
            application.IdleTimerDisabled = false;
HDL-ON_iOS/Info.plist
@@ -119,5 +119,7 @@
    </array>
    <key>NSFaceIDUsageDescription</key>
    <string>Need to use Face ID for unlock verification</string>
    <key>CFBundleAllowMixedLocalizations</key>
    <true/>
</dict>
</plist>
HDL_ON/Common/HDLCommon.cs
@@ -15,6 +15,11 @@
    /// </summary>
    public class HDLCommon
    {
        /// <summary>
        /// 收到推送Action事件
        /// </summary>
        public static Action GetPushMessageAction;
        #region ■ 变量声明___________________________
        /// <summary>
        /// 通用方法
@@ -256,6 +261,7 @@
                        new Alert(Language.StringByID(StringId.Tip), Language.StringByID(StringId.LoggedOnOtherDevices), Language.StringByID(StringId.Close)).Show();
                        //退出登录操作
                        CheckLogout();
                    });
                    return;
                }
@@ -264,6 +270,7 @@
                    Shared.Application.RunOnMainThread(() =>
                    {
                        new Alert(jpushMessageInfo.Title, jpushMessageInfo.Content, Language.StringByID(StringId.Close)).Show();
                        //GetPushMessageAction?.Invoke();
                    });
                    return;
                }
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -94,6 +94,12 @@
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
        }
        public override void RemoveFromParent()
        {
            UnregisterGetPushMessageAction();
            base.RemoveFromParent();
        }
        public void LoadPage()
        {
            try
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -282,6 +282,7 @@
                //房间删除事件
                Action backAction = () => {
                    RegisterGetPushMessageAction();
                    GetUnreadPushMessages();
                };
@@ -411,6 +412,28 @@
            }
        }
        /// <summary>
        /// 注册收到推送监听
        /// </summary>
        void RegisterGetPushMessageAction()
        {
            //HDLCommon.GetPushMessageAction = () => {
            //    if (bodyView != null)
            //    {
            //        Utlis.WriteLine("GetPushMessageAction H收到推送");
            //        GetUnreadPushMessages();
            //    }
            //};
        }
        /// <summary>
        /// 取消收到推送监听
        /// </summary>
        void UnregisterGetPushMessageAction()
        {
            //HDLCommon.GetPushMessageAction = null;
        }
        #endregion
    }
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();
            //测试代码
            //AddEmptyTipView();
            //TestLoad();
@@ -99,6 +107,14 @@
                MenuButtonSelect(0);
            };
            allMenuButton.SelectAction = allAction;
#if DEBUG
            //测试提前当前推送ID
            allMenuButton.ImageButton.MouseLongEventHandler = (sender, e) =>
            {
                CopyToClipboard("推送ID:" + 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
    }