mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor(group): Move UI code out of Group::setName
This commit is contained in:
parent
14c2a30f4c
commit
9495a411cb
|
@ -70,11 +70,6 @@ void Group::updatePeer(int peerId, QString name)
|
|||
|
||||
void Group::setName(const QString& name)
|
||||
{
|
||||
chatForm->setName(name);
|
||||
|
||||
if (widget->isActive())
|
||||
GUI::setWindowTitle(name);
|
||||
|
||||
emit titleChanged(this->getGroupWidget());
|
||||
}
|
||||
|
||||
|
|
|
@ -1737,10 +1737,17 @@ void Widget::onGroupTitleChanged(int groupnumber, const QString& author, const Q
|
|||
g->getChatForm()->addSystemInfoMessage(message, ChatMessage::INFO, curTime);
|
||||
}
|
||||
|
||||
contactListWidget->renameGroupWidget(g->getGroupWidget(), title);
|
||||
GroupWidget* widget = g->getGroupWidget();
|
||||
contactListWidget->renameGroupWidget(widget, title);
|
||||
g->getChatForm()->setName(title);
|
||||
|
||||
if (widget->isActive()) {
|
||||
GUI::setWindowTitle(title);
|
||||
}
|
||||
|
||||
g->setName(title);
|
||||
FilterCriteria filter = getFilterCriteria();
|
||||
g->getGroupWidget()->searchName(ui->searchContactText->text(), filterGroups(filter));
|
||||
widget->searchName(ui->searchContactText->text(), filterGroups(filter));
|
||||
}
|
||||
|
||||
void Widget::onGroupPeerAudioPlaying(int groupnumber, int peernumber)
|
||||
|
|
Loading…
Reference in New Issue
Block a user