summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
index ebf05b7..434da38 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
@@ -164,15 +164,21 @@ void QtUserSearchWindow::handleContactSuggestionRequested(const QString& text) {
}
void QtUserSearchWindow::addContact() {
- if (!!firstMultiJIDPage_->jid_->getContact()) {
- contactVector_.push_back(firstMultiJIDPage_->jid_->getContact());
+ auto contactToAdd = firstMultiJIDPage_->jid_->getContact();
+ if (!!contactToAdd) {
+ contactVector_.push_back(contactToAdd);
firstMultiJIDPage_->jid_->clear();
}
+
firstMultiJIDPage_->contactList_->setList(contactVector_);
firstMultiJIDPage_->emitCompletenessCheck();
if (type_ == ChatToContact) {
firstMultiJIDPage_->groupBox->setEnabled(supportsImpromptu_ ? 1 : (contactVector_.size() < 1));
}
+
+ if (!!contactToAdd && contactToAdd->jid.isValid() && contactToAdd->statusType == StatusShow::None) {
+ onJIDUpdateRequested({contactToAdd->jid});
+ }
}
void QtUserSearchWindow::setWarning(const boost::optional<std::string>& message) {