2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 06:55:58 +00:00

Support default General topic in forums.

This commit is contained in:
John Preston
2022-09-26 17:37:32 +04:00
parent 2201159da5
commit 73e56b0340
23 changed files with 385 additions and 183 deletions

View File

@@ -198,6 +198,9 @@ void ForumTopic::requestChatListMessage() {
}
TimeId ForumTopic::adjustedChatListTimeId() const {
if (isGeneral()) {
return TimeId(1);
}
const auto result = chatListTimeId();
#if 0 // #TODO forum
if (const auto draft = cloudDraft()) {
@@ -236,10 +239,10 @@ bool ForumTopic::lastServerMessageKnown() const {
}
void ForumTopic::applyTitle(const QString &title) {
if (_title == title) {
if (_title == title || (isGeneral() && !_title.isEmpty())) {
return;
}
_title = title;
_title = isGeneral() ? "General! Topic." : title; // #TODO forum lang
++_titleVersion;
indexTitleParts();
updateChatListEntry();