internal YamsterThread(long threadId, YamsterGroup group, YamsterCache yamsterCache) : base(yamsterCache) { this.ThreadId = threadId; this.Group = group; this.participants = YamsterUserSet.EmptyUserSet; this.dbThreadState = new DbThreadState() { ThreadId = threadId, ChangeNumber = 0 }; }
internal void UpdateConversation(DbConversation conversation, YamsterModelEventCollector eventCollector) { this.ConversationId = conversation.ConversationId; var users = new List <YamsterUser>(conversation.ParticipantUserIds.Count); foreach (long userId in conversation.ParticipantUserIds) { var user = YamsterCache.FetchUserById(userId, eventCollector); users.Add(user); } this.participants = new YamsterUserSet(users); eventCollector.NotifyAfterUpdate(this); }