Beispiel #1
0
 public void updateFromSocketResponseUpdateChannelData(SocketResponseUpdateChannelData channel)
 {
     this.id          = channel?.id ?? this.id;
     this.groupId     = channel?.groupId ?? this.groupId;
     this.thumbnail   = channel?.thumbnail ?? this.thumbnail;
     this.name        = channel?.name ?? this.name;
     this.topic       = channel?.topic ?? this.topic;
     this.memberCount = channel?.memberCount ?? this.memberCount;
     this.isMute      = channel?.isMute ?? this.isMute;
     this.live        = channel?.live ?? this.live;
     this.lastMessage = channel?.lastMessage == null
         ? this.lastMessage
         : ChannelMessageView.fromChannelMessageLite(channel.lastMessage);
 }
Beispiel #2
0
        public static ChannelView fromSocketResponseUpdateChannelData(SocketResponseUpdateChannelData channel)
        {
            ChannelView channelView = new ChannelView {
                atAll           = false,
                memberIds       = new List <string>(),
                membersDict     = new Dictionary <string, ChannelMember>(),
                messageIds      = new List <string>(),
                localMessageIds = new List <string>(),
                oldMessageIds   = new List <string>(),
                newMessageIds   = new List <string>(),
                currentMember   = new ChannelMember()
            };

            channelView.updateFromSocketResponseUpdateChannelData(channel);
            return(channelView);
        }