UpdateReadHistoryInbox.deserialize constructor
UpdateReadHistoryInbox.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory UpdateReadHistoryInbox.deserialize(BinaryReader reader) {
// Read [UpdateReadHistoryInbox] fields.
final flags = reader.readInt32();
final hasFolderIdField = (flags & 1) != 0;
final folderId = hasFolderIdField ? reader.readInt32() : null;
final peer = reader.readObject() as PeerBase;
final maxId = reader.readInt32();
final stillUnreadCount = reader.readInt32();
final pts = reader.readInt32();
final ptsCount = reader.readInt32();
// Construct [UpdateReadHistoryInbox] object.
final returnValue = UpdateReadHistoryInbox(
folderId: folderId,
peer: peer,
maxId: maxId,
stillUnreadCount: stillUnreadCount,
pts: pts,
ptsCount: ptsCount,
);
// Now return the deserialized [UpdateReadHistoryInbox].
return returnValue;
}