MateriiApps / OpenCord

An open-source Material You implementation of the Discord Android app
GNU General Public License v3.0
1.24k stars 99 forks source link

feat: unread icon logic #109

Closed rushiiMachine closed 1 year ago

rushiiMachine commented 1 year ago

Adds support for unread indicators logic

Due to the way they work, we need to provide both the last message id of a channel and the read state for it (last read message id & mention count)

I decoupled the lastMessageId from DomainChannel to avoid unnecessary updates and made it be stored separately in MessageStore. A flow for "new message ids" isn't really needed because we already essentially have one, that being the regular message event which the ChannelViewModel now subscribes to

Mention count & marking a channel read will come later

Degl1 commented 1 year ago

whaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa opncrod comit????