Refresh Frogram branding and topic read state - #7
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: edd2c43fe6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (topicId != null && topicId.getConstructor() == TdApi.MessageTopicForum.CONSTRUCTOR) { | ||
| return canGoUnread(chat, null, forumTopic) ? HIGHLIGHT_MODE_UNREAD : HIGHLIGHT_MODE_NONE; |
There was a problem hiding this comment.
Consult saved anchors for forum topics
When a forum topic has no unread messages but has a saved non-bottom scroll position, this unconditional return produces HIGHLIGHT_MODE_NONE before the topic-specific SavedMessageId is read below. Reopening the topic therefore jumps to the latest messages instead of restoring the user's position, even though saveScrollPosition() persists positions under the topic ID.
Useful? React with 👍 / 👎.
|
|
||
| if (previewSearchSender == null) { | ||
| manager.openChat(chat, messageThread, messageTopicId, previewSearchFilter, this, areScheduled, !inPreviewMode && !isInForceTouchMode()); | ||
| manager.openChat(chat, messageThread, messageTopicId, activeForumTopic, previewSearchFilter, this, areScheduled, !inPreviewMode && !isInForceTouchMode()); |
There was a problem hiding this comment.
Wait for topic state before loading its history
When a forum topic is opened through Arguments, such as a restored default topic or deep link, updateTopicBar() has only started the asynchronous GetForumTopic request, so activeForumTopic is still null here. The initial history is consequently processed with the chat-wide read IDs and unread count; the request callback only replaces the loader metadata and counters and never reloads or reprocesses that chunk, leaving its unread divider based on the whole chat rather than the topic.
Useful? React with 👍 / 👎.
| } else if (activeForumTopic != null && getChatId() == chatId && Td.matchesTopic(topicId, messageTopicId)) { | ||
| activeForumTopic.lastReadInboxMessageId = lastReadInboxMessageId; | ||
| activeForumTopic.unreadCount = remainingUnreadCount; |
There was a problem hiding this comment.
Wire forum reads to a reachable update path
This forum-topic branch cannot receive the updates it is intended to handle: onMessageThreadReadInbox() is emitted only by ThreadInfo, while this controller subscribes to a ThreadInfo only when messageThread is non-null, whereas active forum topics use messageTopicId with messageThread null. Partial topic reads therefore never apply remainingUnreadCount; onForumTopicUpdated() only clears the count after the last message is read, so the unread badge remains stale during partial reading.
Useful? React with 👍 / 👎.
Обновляет launcher-иконки Frogram X для всех DPI и adaptive icon, переписывает README и исправляет открытие/прочтение истории форум-топиков отдельно от общего чата.