2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-04 00:15:42 +00:00

Fix field autocomplete in empty chat.

This commit is contained in:
John Preston
2018-06-26 21:15:29 +01:00
parent 35c759c6bc
commit 44c6050bf2
3 changed files with 28 additions and 17 deletions

View File

@@ -57,7 +57,10 @@ void FieldAutocomplete::paintEvent(QPaintEvent *e) {
p.fillRect(rect(), st::mentionBg);
}
void FieldAutocomplete::showFiltered(PeerData *peer, QString query, bool addInlineBots) {
void FieldAutocomplete::showFiltered(
not_null<PeerData*> peer,
QString query,
bool addInlineBots) {
_chat = peer->asChat();
_user = peer->asUser();
_channel = peer->asChannel();
@@ -105,9 +108,9 @@ void FieldAutocomplete::showStickers(EmojiPtr emoji) {
return;
}
_chat = 0;
_user = 0;
_channel = 0;
_chat = nullptr;
_user = nullptr;
_channel = nullptr;
updateFiltered(resetScroll);
}