Fixes #1218 Usercard link from search popup

This commit is contained in:
fourtf 2019-08-21 01:19:41 +02:00
parent b513caf572
commit 67aadfe61f
2 changed files with 3 additions and 1 deletions

View file

@ -19,6 +19,7 @@ SearchPopup::SearchPopup()
void SearchPopup::setChannel(ChannelPtr channel) void SearchPopup::setChannel(ChannelPtr channel)
{ {
this->channelName_ = channel->getName();
this->snapshot_ = channel->getMessageSnapshot(); this->snapshot_ = channel->getMessageSnapshot();
this->performSearch(); this->performSearch();
@ -83,7 +84,7 @@ void SearchPopup::performSearch()
{ {
QString text = searchInput_->text(); QString text = searchInput_->text();
ChannelPtr channel(new Channel("search", Channel::Type::None)); ChannelPtr channel(new Channel(this->channelName_, Channel::Type::None));
for (size_t i = 0; i < this->snapshot_.size(); i++) for (size_t i = 0; i < this->snapshot_.size(); i++)
{ {

View file

@ -32,6 +32,7 @@ private:
LimitedQueueSnapshot<MessagePtr> snapshot_; LimitedQueueSnapshot<MessagePtr> snapshot_;
QLineEdit *searchInput_; QLineEdit *searchInput_;
ChannelView *channelView_; ChannelView *channelView_;
QString channelName_;
}; };
} // namespace chatterino } // namespace chatterino