private async Task DeleteNotification() { NotificationList.Remove(SelectedNotification); await _notificationService.Delete <Notification>(SelectedNotification.NotificationId); SelectedNotification = null; NotifInt--; NotificationNumber = "Notifications: " + NotifInt.ToString(); }
private async Task Init() { var notifications = await _notificationService.Get <List <Model.Notification> >(new NotificationSearchRequest() { UserId = APIService.loggedProfile.UserId }); var sorted = notifications.OrderByDescending(a => a.NotifDateTime).ToList(); NotificationList.AddRange(sorted); NotifInt = notifications.Count; NotificationNumber = "Notifications: " + NotifInt.ToString(); }