mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
parent
5bc8ef4e74
commit
c0a7488c12
|
@ -429,8 +429,4 @@ void FriendWidget::setAlias(const QString& _alias)
|
|||
// Hack to avoid edit const Friend. TODO: Repalce on emit
|
||||
Friend* f = FriendList::findFriend(frnd->getId());
|
||||
f->setAlias(alias);
|
||||
|
||||
Settings& s = Settings::getInstance();
|
||||
s.setFriendAlias(frnd->getPublicKey(), alias);
|
||||
s.savePersonal();
|
||||
}
|
||||
|
|
|
@ -1099,10 +1099,10 @@ void Widget::onFriendAliasChanged(uint32_t friendId, const QString& alias)
|
|||
GUI::setWindowTitle(alias);
|
||||
}
|
||||
|
||||
Status s = f->getStatus();
|
||||
contactListWidget->moveWidget(friendWidget, s);
|
||||
Status status = f->getStatus();
|
||||
contactListWidget->moveWidget(friendWidget, status);
|
||||
FilterCriteria criteria = getFilterCriteria();
|
||||
bool filter = s == Status::Offline ? filterOffline(criteria) : filterOnline(criteria);
|
||||
bool filter = status == Status::Offline ? filterOffline(criteria) : filterOnline(criteria);
|
||||
friendWidget->searchName(ui->searchContactText->text(), filter);
|
||||
|
||||
ChatForm* friendForm = chatForms[friendId];
|
||||
|
@ -1110,6 +1110,11 @@ void Widget::onFriendAliasChanged(uint32_t friendId, const QString& alias)
|
|||
for (Group* g : GroupList::getAllGroups()) {
|
||||
g->regeneratePeerList();
|
||||
}
|
||||
|
||||
const ToxPk& pk = f->getPublicKey();
|
||||
Settings& s = Settings::getInstance();
|
||||
s.setFriendAlias(pk, alias);
|
||||
s.savePersonal();
|
||||
}
|
||||
|
||||
void Widget::onChatroomWidgetClicked(GenericChatroomWidget* widget)
|
||||
|
|
Loading…
Reference in New Issue
Block a user