mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
parent
ddf886eaf1
commit
323cdc5561
2 changed files with 9 additions and 6 deletions
|
@ -112,8 +112,7 @@ void ChatWidget::setChannelName(const QString &_newChannelName)
|
||||||
this->header.updateChannelText();
|
this->header.updateChannelText();
|
||||||
|
|
||||||
// update view
|
// update view
|
||||||
this->view.layoutMessages();
|
this->layoutMessages(true);
|
||||||
this->view.update();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatWidget::setChannel(std::shared_ptr<Channel> _newChannel)
|
void ChatWidget::setChannel(std::shared_ptr<Channel> _newChannel)
|
||||||
|
@ -177,9 +176,9 @@ void ChatWidget::showChangeChannelPopup()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatWidget::layoutMessages()
|
void ChatWidget::layoutMessages(bool forceUpdate)
|
||||||
{
|
{
|
||||||
if (this->view.layoutMessages()) {
|
if (this->view.layoutMessages() || forceUpdate) {
|
||||||
this->view.update();
|
this->view.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -249,7 +248,11 @@ void ChatWidget::doPopup()
|
||||||
|
|
||||||
void ChatWidget::doClearChat()
|
void ChatWidget::doClearChat()
|
||||||
{
|
{
|
||||||
qDebug() << "[UNIMPLEMENTED] Clear chat";
|
// Clear all stored messages in this chat widget
|
||||||
|
this->messages.clear();
|
||||||
|
|
||||||
|
// Layout chat widget messages, and force an update regardless if there are no messages
|
||||||
|
this->layoutMessages(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatWidget::doOpenChannel()
|
void ChatWidget::doOpenChannel()
|
||||||
|
|
|
@ -51,7 +51,7 @@ public:
|
||||||
|
|
||||||
void showChangeChannelPopup();
|
void showChangeChannelPopup();
|
||||||
messages::LimitedQueueSnapshot<messages::SharedMessageRef> getMessagesSnapshot();
|
messages::LimitedQueueSnapshot<messages::SharedMessageRef> getMessagesSnapshot();
|
||||||
void layoutMessages();
|
void layoutMessages(bool forceUpdate = false);
|
||||||
void updateGifEmotes();
|
void updateGifEmotes();
|
||||||
|
|
||||||
void giveFocus();
|
void giveFocus();
|
||||||
|
|
Loading…
Reference in a new issue