mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-04 08:25:38 +00:00
Support cloud view_as_messages forum setting.
This commit is contained in:
@@ -520,18 +520,37 @@ void Widget::chosenRow(const ChosenRow &row) {
|
||||
}
|
||||
return;
|
||||
} else if (const auto topic = row.key.topic()) {
|
||||
session().data().saveViewAsMessages(topic->forum(), false);
|
||||
controller()->showThread(
|
||||
topic,
|
||||
row.message.fullId.msg,
|
||||
Window::SectionShow::Way::ClearStack);
|
||||
} else if (history && history->isForum() && !row.message.fullId) {
|
||||
} else if (history
|
||||
&& history->isForum()
|
||||
&& !row.message.fullId
|
||||
&& (!controller()->adaptive().isOneColumn()
|
||||
|| !history->peer->forum()->channel()->viewForumAsMessages())) {
|
||||
const auto forum = history->peer->forum();
|
||||
if (controller()->shownForum().current() == forum) {
|
||||
controller()->closeForum();
|
||||
} else {
|
||||
controller()->showForum(
|
||||
forum,
|
||||
Window::SectionShow().withChildColumn());
|
||||
return;
|
||||
}
|
||||
controller()->showForum(
|
||||
forum,
|
||||
Window::SectionShow().withChildColumn());
|
||||
if (forum->channel()->viewForumAsMessages()) {
|
||||
controller()->showThread(
|
||||
history,
|
||||
ShowAtUnreadMsgId,
|
||||
Window::SectionShow::Way::ClearStack);
|
||||
} else if (!controller()->adaptive().isOneColumn()) {
|
||||
const auto item = history->chatListMessage();
|
||||
if (const auto topic = item ? item->topic() : nullptr) {
|
||||
controller()->showThread(
|
||||
topic,
|
||||
ShowAtUnreadMsgId,
|
||||
Window::SectionShow::Way::ClearStack);
|
||||
}
|
||||
}
|
||||
return;
|
||||
} else if (history) {
|
||||
|
Reference in New Issue
Block a user