mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-25 04:38:23 +00:00
Always open first topic in two-column layout.
This commit is contained in:
parent
f97e5d6307
commit
106bdae9ce
@ -3212,13 +3212,24 @@ bool InnerWidget::chooseRow(
|
|||||||
if (IsServerMsgId(chosen.message.fullId.msg)) {
|
if (IsServerMsgId(chosen.message.fullId.msg)) {
|
||||||
session().local().saveRecentSearchHashtags(_filter);
|
session().local().saveRecentSearchHashtags(_filter);
|
||||||
}
|
}
|
||||||
if (pressedTopicRootId && !chosen.message.fullId) {
|
if (!chosen.message.fullId) {
|
||||||
const auto history = chosen.key.history();
|
if (const auto history = chosen.key.history()) {
|
||||||
if (history->peer->isForum()) {
|
if (const auto forum = history->peer->forum()) {
|
||||||
chosen.message.fullId = {
|
if (pressedTopicRootId) {
|
||||||
history->peer->id,
|
chosen.message.fullId = {
|
||||||
pressedTopicRootId,
|
history->peer->id,
|
||||||
};
|
pressedTopicRootId,
|
||||||
|
};
|
||||||
|
} else if (!_controller->adaptive().isOneColumn()) {
|
||||||
|
const auto &recent = forum->recentTopics();
|
||||||
|
if (!recent.empty()) {
|
||||||
|
chosen.message.fullId = {
|
||||||
|
history->peer->id,
|
||||||
|
recent.front()->rootId(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_chosenRow.fire_copy(chosen);
|
_chosenRow.fire_copy(chosen);
|
||||||
|
Loading…
Reference in New Issue
Block a user