UpdateReadChannelDiscussionInbox.deserialize constructor
UpdateReadChannelDiscussionInbox.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory UpdateReadChannelDiscussionInbox.deserialize(BinaryReader reader) {
// Read [UpdateReadChannelDiscussionInbox] fields.
final flags = reader.readInt32();
final channelId = reader.readInt64();
final topMsgId = reader.readInt32();
final readMaxId = reader.readInt32();
final hasBroadcastIdField = (flags & 1) != 0;
final broadcastId = hasBroadcastIdField ? reader.readInt64() : null;
final hasBroadcastPostField = (flags & 1) != 0;
final broadcastPost = hasBroadcastPostField ? reader.readInt32() : null;
// Construct [UpdateReadChannelDiscussionInbox] object.
final returnValue = UpdateReadChannelDiscussionInbox(
channelId: channelId,
topMsgId: topMsgId,
readMaxId: readMaxId,
broadcastId: broadcastId,
broadcastPost: broadcastPost,
);
// Now return the deserialized [UpdateReadChannelDiscussionInbox].
return returnValue;
}