mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
fix(app): keep unread channel opens anchored to the divider
This commit is contained in:
1 parent
8e17970632
commit
d3976e33f8
8 files changed
+223
-7
No files matched your search
@@ -457,6 +457,9 @@ class ReadStates {
|
||||
this.refreshUnreadEstimate(state);
|
||||
} else if (action.isAfter && state.ackMessageId != null && messages.has(state.ackMessageId, true)) {
|
||||
state.unreadCount += action.messages.length;
|
||||
if (state.oldestUnreadMessageId == null) {
|
||||
state.rebuild();
|
||||
}
|
||||
}
|
||||
this.notifyChange(action.channelId);
|
||||
}
|
||||
@@ -533,6 +536,7 @@ class ReadStates {
|
||||
}
|
||||
|
||||
handleMessageDelete(action: {channelId: string}): void {
|
||||
this.getIfExists(action.channelId)?.rebuild();
|
||||
this.notifyChange(action.channelId);
|
||||
}
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ export class ReadStateEntry {
|
||||
} else {
|
||||
this.unreadCount = loadedUnreadCount;
|
||||
}
|
||||
this.oldestUnreadMessageId = hasUnreadBoundary ? (this.storedOldestUnreadMessageId ?? oldestUnread) : null;
|
||||
this.oldestUnreadMessageId = this.storedOldestUnreadMessageId ?? oldestUnread;
|
||||
}
|
||||
|
||||
shouldMentionFor(message: MessageModel | WireMessage, userId: string, isPrivate: boolean): boolean {
|
||||
|
||||
Reference in new issue
Block a user