// Token: 0x0600534F RID: 21327 RVA: 0x001CA6D0 File Offset: 0x001C8AD0 public void RemoveNotification(ApiNotification n, NotificationManager.HistoryRange historyRange) { if (this.notifications.ContainsKey(historyRange) && this.notifications[historyRange].ContainsKey(n.notificationType)) { this.notifications[historyRange][n.notificationType].Remove(this.notifications[historyRange][n.notificationType].First((ApiNotification no) => no.id == n.id)); } }
// Token: 0x0600534E RID: 21326 RVA: 0x001CA628 File Offset: 0x001C8A28 public void AddNotification(ApiNotification n, NotificationManager.HistoryRange historyRange) { if (!this.notifications.ContainsKey(historyRange)) { this.notifications[historyRange] = new Dictionary <ApiNotification.NotificationType, List <ApiNotification> >(); } if (!this.notifications[historyRange].ContainsKey(n.notificationType)) { this.notifications[historyRange][n.notificationType] = new List <ApiNotification>(); } if (!this.notifications[historyRange][n.notificationType].Contains(n)) { this.notifications[historyRange][n.notificationType].Add(n); } }
// Token: 0x0600534B RID: 21323 RVA: 0x001CA3B0 File Offset: 0x001C87B0 public void FetchNotifications(NotificationManager.HistoryRange historyRange, Action <List <ApiNotification> > onSuccess = null) { if (!RoomManager.inRoom) { return; } string afterString = string.Empty; if (historyRange != NotificationManager.HistoryRange.AllTime) { if (historyRange == NotificationManager.HistoryRange.Recent) { afterString = "4_minutes_ago"; } } this.ClearOldLocalNotifications(); if (Player.Instance != null && Player.Instance.isInternal) { this.CheckAndClearHandledHalps(); } ApiNotification.FetchAll(ApiNotification.NotificationType.All, false, afterString, delegate(List <ApiNotification> notifs) { if (this.notifications.ContainsKey(historyRange)) { this.notifications[historyRange].Clear(); } foreach (ApiNotification n in notifs) { this.AddNotification(n, historyRange); } if (onSuccess != null) { onSuccess(notifs); } if (this.OnRecentNotificationsFetched != null) { this.OnRecentNotificationsFetched(notifs); } }, delegate { Debug.LogError("Could not fetch Notifications"); }); }
// Token: 0x06005351 RID: 21329 RVA: 0x001CA834 File Offset: 0x001C8C34 public bool HasNotificationsOfType(ApiNotification.NotificationType t, NotificationManager.HistoryRange historyRange) { return(this.GetNotificationsOfType(t, historyRange).Count > 0); }
// Token: 0x06005350 RID: 21328 RVA: 0x001CA76C File Offset: 0x001C8B6C public List <ApiNotification> GetNotificationsOfType(ApiNotification.NotificationType t, NotificationManager.HistoryRange historyRange) { List <ApiNotification> list = new List <ApiNotification>(); if (this.notifications.ContainsKey(historyRange)) { if (t == ApiNotification.NotificationType.All) { foreach (KeyValuePair <ApiNotification.NotificationType, List <ApiNotification> > keyValuePair in this.notifications[historyRange]) { if (keyValuePair.Key != ApiNotification.NotificationType.Hidden) { list.AddRange(keyValuePair.Value); } } } else if (this.notifications[historyRange].ContainsKey(t)) { list = new List <ApiNotification>(this.notifications[historyRange][t]); } } return(list); }