mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Show chosen search result in topic messages search.
This commit is contained in:
parent
fcf9ca3982
commit
443745e3fc
2 changed files with 13 additions and 13 deletions
|
@ -1783,11 +1783,13 @@ void RepliesWidget::finishSending() {
|
||||||
|
|
||||||
void RepliesWidget::showAtPosition(
|
void RepliesWidget::showAtPosition(
|
||||||
Data::MessagePosition position,
|
Data::MessagePosition position,
|
||||||
FullMsgId originItemId) {
|
FullMsgId originItemId,
|
||||||
|
anim::type animated) {
|
||||||
_lastShownAt = position.fullId;
|
_lastShownAt = position.fullId;
|
||||||
|
controller()->setActiveChatEntry(activeChat());
|
||||||
_inner->showAtPosition(
|
_inner->showAtPosition(
|
||||||
position,
|
position,
|
||||||
anim::type::normal,
|
animated,
|
||||||
_cornerButtons.doneJumpFrom(position.fullId, originItemId));
|
_cornerButtons.doneJumpFrom(position.fullId, originItemId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1802,16 +1804,13 @@ not_null<History*> RepliesWidget::history() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
Dialogs::RowDescriptor RepliesWidget::activeChat() const {
|
Dialogs::RowDescriptor RepliesWidget::activeChat() const {
|
||||||
|
const auto messageId = _lastShownAt
|
||||||
|
? _lastShownAt
|
||||||
|
: FullMsgId(_history->peer->id, ShowAtUnreadMsgId);
|
||||||
if (_topic) {
|
if (_topic) {
|
||||||
return {
|
return { _topic, messageId };
|
||||||
_topic,
|
|
||||||
FullMsgId(_history->peer->id, ShowAtUnreadMsgId),
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
return {
|
return { _history, messageId };
|
||||||
_history,
|
|
||||||
FullMsgId(_history->peer->id, ShowAtUnreadMsgId)
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RepliesWidget::preventsClose(Fn<void()> &&continueCallback) const {
|
bool RepliesWidget::preventsClose(Fn<void()> &&continueCallback) const {
|
||||||
|
@ -2019,10 +2018,10 @@ void RepliesWidget::restoreState(not_null<RepliesMemento*> memento) {
|
||||||
_cornerButtons.setReplyReturns(memento->replyReturns());
|
_cornerButtons.setReplyReturns(memento->replyReturns());
|
||||||
_inner->restoreState(memento->list());
|
_inner->restoreState(memento->list());
|
||||||
if (const auto highlight = memento->getHighlightId()) {
|
if (const auto highlight = memento->getHighlightId()) {
|
||||||
_inner->showAtPosition(Data::MessagePosition{
|
showAtPosition(Data::MessagePosition{
|
||||||
.fullId = FullMsgId(_history->peer->id, highlight),
|
.fullId = FullMsgId(_history->peer->id, highlight),
|
||||||
.date = TimeId(0),
|
.date = TimeId(0),
|
||||||
}, anim::type::instant);
|
}, {}, anim::type::instant);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -198,7 +198,8 @@ private:
|
||||||
void showAtEnd();
|
void showAtEnd();
|
||||||
void showAtPosition(
|
void showAtPosition(
|
||||||
Data::MessagePosition position,
|
Data::MessagePosition position,
|
||||||
FullMsgId originItemId = {});
|
FullMsgId originItemId = {},
|
||||||
|
anim::type animated = anim::type::normal);
|
||||||
void finishSending();
|
void finishSending();
|
||||||
|
|
||||||
void setupComposeControls();
|
void setupComposeControls();
|
||||||
|
|
Loading…
Add table
Reference in a new issue