- protected fun addNotification(vararg notifications: Notification) {
- this.notifications += notifications
+ protected fun addNotification(notification: Notification, notificationId: String? = null) {
+ notifications[notificationId ?: notification.id] = notification
+ }
+
+ protected fun addSone(sone: Sone, soneId: String? = null) {
+ remoteSones += (soneId ?: sone.id) to sone
+ }
+
+ protected fun addLocalSone(id: String, sone: Sone) {
+ localSones += id to sone
+ }
+
+ protected fun addPost(post: Post, id: String? = null) {
+ posts[id ?: post.id] = post
+ }
+
+ protected fun addLikes(post: Post, vararg sones: Sone) {
+ postLikes[post] = setOf(*sones)