예제 #1
0
 public async Task SetAllNotificationsAsRead()
 {
     await _userNotificationManager.UpdateAllUserNotificationStatesAsync(AbpSession.ToUserIdentifier(), UserNotificationState.Read);
 }
 /// <summary>
 /// Updates all notification states for a user.
 /// </summary>
 /// <param name="userNotificationManager">User notificaiton manager</param>
 /// <param name="user">User.</param>
 /// <param name="state">New state.</param>
 public static void UpdateAllUserNotificationStates(this IUserNotificationManager userNotificationManager, UserIdentifier user, UserNotificationState state)
 {
     AsyncHelper.RunSync(() => userNotificationManager.UpdateAllUserNotificationStatesAsync(user, state));
 }
예제 #3
0
 public async Task MarkAllAsReaded(long userId)
 {
     var userIdentifier = new UserIdentifier(1, userId);
     await _userNotificationManager.UpdateAllUserNotificationStatesAsync(userIdentifier, UserNotificationState.Read);
 }
예제 #4
0
 public async Task UpdateStatesAsync([NotNull] UserNotificationState state)
 {
     await _userNotificationManager.UpdateAllUserNotificationStatesAsync(CurrentUser.Id.Value, state);
 }
예제 #5
0
 /// <summary>
 /// 将所有通知置为已读
 /// </summary>
 public async Task SetAllNotificationsAsRead()
 {
     var currentUserId = AbpSession.ToUserIdentifier();
     await _userNotificationManager.UpdateAllUserNotificationStatesAsync(currentUserId, UserNotificationState.Read);
 }