public override async Task OnNavigatedToAsync(object parameter, NavigationMode mode, IDictionary <string, object> state)
        {
            ProtoService.Send(new GetNotificationSettings(new NotificationSettingsScopePrivateChats()), result =>
            {
                if (result is NotificationSettings settings)
                {
                    BeginOnUIThread(() =>
                    {
                        PrivateAlert   = settings.MuteFor == 0;
                        PrivatePreview = settings.ShowPreview;
                    });
                }
            });

            ProtoService.Send(new GetNotificationSettings(new NotificationSettingsScopeBasicGroupChats()), result =>
            {
                if (result is NotificationSettings settings)
                {
                    BeginOnUIThread(() =>
                    {
                        GroupAlert   = settings.MuteFor == 0;
                        GroupPreview = settings.ShowPreview;
                    });
                }
            });

            IsVibrationAvailable = await _vibrationService.GetAvailabilityAsync();
        }
Пример #2
0
        public override async Task OnNavigatedToAsync(object parameter, NavigationMode mode, IDictionary <string, object> state)
        {
            foreach (var scope in Scopes)
            {
                scope.Update();
            }

            IsVibrationAvailable = await _vibrationService.GetAvailabilityAsync();
        }
 public override async Task OnNavigatedToAsync(object parameter, NavigationMode mode, IDictionary <string, object> state)
 {
     IsVibrationAvailable = await _vibrationService.GetAvailabilityAsync();
     await UpdateAsync();
 }