2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 15:05:56 +00:00

Implement preview top and bottom.

This commit is contained in:
John Preston
2024-05-04 11:37:07 +04:00
parent de73d8766c
commit a60783eae3
6 changed files with 289 additions and 43 deletions

View File

@@ -2341,7 +2341,15 @@ void InnerWidget::showChatPreview(bool onlyUserpic) {
if (const auto thread = weakThread.get()) {
const auto itemId = action.openItemId;
const auto owner = &thread->owner();
if (action.openInfo) {
if (action.markRead) {
Window::MarkAsReadThread(thread);
} else if (action.markUnread) {
if (const auto history = thread->asHistory()) {
history->owner().histories().changeDialogUnreadMark(
history,
true);
}
} else if (action.openInfo) {
controller->showPeerInfo(thread);
} else if (const auto item = owner->message(itemId)) {
controller->showMessage(item);