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
|
// Hack to avoid edit const Friend. TODO: Repalce on emit
|
||||||
Friend* f = FriendList::findFriend(frnd->getId());
|
Friend* f = FriendList::findFriend(frnd->getId());
|
||||||
f->setAlias(alias);
|
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);
|
GUI::setWindowTitle(alias);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status s = f->getStatus();
|
Status status = f->getStatus();
|
||||||
contactListWidget->moveWidget(friendWidget, s);
|
contactListWidget->moveWidget(friendWidget, status);
|
||||||
FilterCriteria criteria = getFilterCriteria();
|
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);
|
friendWidget->searchName(ui->searchContactText->text(), filter);
|
||||||
|
|
||||||
ChatForm* friendForm = chatForms[friendId];
|
ChatForm* friendForm = chatForms[friendId];
|
||||||
|
@ -1110,6 +1110,11 @@ void Widget::onFriendAliasChanged(uint32_t friendId, const QString& alias)
|
||||||
for (Group* g : GroupList::getAllGroups()) {
|
for (Group* g : GroupList::getAllGroups()) {
|
||||||
g->regeneratePeerList();
|
g->regeneratePeerList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const ToxPk& pk = f->getPublicKey();
|
||||||
|
Settings& s = Settings::getInstance();
|
||||||
|
s.setFriendAlias(pk, alias);
|
||||||
|
s.savePersonal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::onChatroomWidgetClicked(GenericChatroomWidget* widget)
|
void Widget::onChatroomWidgetClicked(GenericChatroomWidget* widget)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user