protected override void OnAppearing()
        {
            if (Application.Current.MainPage is MasterDetailPage masterDetailPage)
            {
                masterDetailPage.IsGestureEnabled = true;
            }
            else if (Application.Current.MainPage is NavigationPage navigationPage && navigationPage.CurrentPage is MasterDetailPage nestedMasterDetail)
            {
                nestedMasterDetail.IsGestureEnabled = true;
            }
            base.OnAppearing();
            UpdateUnReadCount(AppChat.Helpers.Helper.Instiance().UnReadMsg);
            // Update lại số lượng tin nhắn chưa đọc
            AppChat.Helpers.Helper.Instiance().NotifyAcceptOrCancelAddFrd += ResponseAccept;
            isUpadate = true;
            if (model == null)
            {
                model = BindingContext as PersonalPageViewModel;
            }
            model.personalPage = this;

            if (!isFirst)
            {
                AppChat.Services.Service.Instiance().inPage = 1;
                Helper.Instance().objMyClub = this;
                Helper.Instance().GetMyClub(Helper.Instance().MyAccount.Number_Id);
                // Gửi yêu cầu lấy số lượng thách đấu
                ChallengeAction.SetGetChallenge(Helper.Instance().MyAccount.Number_Id, 0);
                // Đăng ký delegate để lấy danh sách ClubId
                //  Helper.Instance().GetClubIdAck += GetClubId;
                //  Helper.Instance().GetClubAck += GetClub;
                // Helper.Instance().CheckExistClubMyClubId(Helper.Instance().MyAccount.Number_Id);
                isFirst = true;
            }
            Device.StartTimer(TimeSpan.FromMilliseconds(1000), () =>
            {
                UpdateNotify();
                return(false);
            });
        }
Beispiel #2
0
 public PersonalPage()
 {
     InitializeComponent();
     BindingContext = _viewModel = new PersonalPageViewModel(Navigation);
 }
Beispiel #3
0
 protected override void OnAppearing()
 {
     base.OnAppearing();
     BindingContext = _viewModel = new PersonalPageViewModel(Navigation);
 }
        public PersonalPage()
        {
            InitializeComponent();

            _viewModel = (PersonalPageViewModel)BindingContext;
        }