diff --git a/smsapp/conversationlistmodel.cpp b/smsapp/conversationlistmodel.cpp index 5b545a7b5..7a0c6af4a 100644 --- a/smsapp/conversationlistmodel.cpp +++ b/smsapp/conversationlistmodel.cpp @@ -70,9 +70,6 @@ void ConversationListModel::setDeviceId(const QString& deviceId) m_conversationsInterface = nullptr; } - m_deviceId = deviceId; - Q_EMIT deviceIdChanged(); - // This method still gets called *with a valid deviceID* when the device is not connected while the component is setting up // Detect that case and don't do anything. DeviceDbusInterface device(deviceId); @@ -80,6 +77,9 @@ void ConversationListModel::setDeviceId(const QString& deviceId) return; } + m_deviceId = deviceId; + Q_EMIT deviceIdChanged(); + m_conversationsInterface = new DeviceConversationsDbusInterface(deviceId, this); connect(m_conversationsInterface, SIGNAL(conversationCreated(QVariantMap)), this, SLOT(handleCreatedConversation(QVariantMap))); connect(m_conversationsInterface, SIGNAL(conversationUpdated(QVariantMap)), this, SLOT(handleConversationUpdated(QVariantMap)));