From 6d1416fb6ec7e64a765af652ea3b21722ec12be3 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Tue, 29 Mar 2022 04:50:25 +0200 Subject: Add backend for new room creation dialogs --- src/ui/UserProfile.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/ui/UserProfile.cpp') diff --git a/src/ui/UserProfile.cpp b/src/ui/UserProfile.cpp index 898b56fd..db50b050 100644 --- a/src/ui/UserProfile.cpp +++ b/src/ui/UserProfile.cpp @@ -53,6 +53,9 @@ UserProfile::UserProfile(QString roomid, emit verificationStatiChanged(); }); + connect(this, &UserProfile::devicesChanged, [this]() { + nhlog::net()->critical("Device list: {}", deviceList_.rowCount()); + }); fetchDeviceList(this->userid_); } @@ -187,7 +190,6 @@ UserProfile::fetchDeviceList(const QString &userID) nhlog::net()->warn("failed to query device keys: {},{}", mtx::errors::to_string(err->matrix_error.errcode), static_cast(err->status_code)); - return; } // Ensure local key cache is up to date @@ -201,7 +203,6 @@ UserProfile::fetchDeviceList(const QString &userID) nhlog::net()->warn("failed to query device keys: {},{}", mtx::errors::to_string(err->matrix_error.errcode), static_cast(err->status_code)); - return; } emit verificationStatiChanged(); @@ -312,10 +313,16 @@ UserProfile::kickUser() ChatPage::instance()->kickUser(this->userid_, QLatin1String("")); } +void +UserProfile::startChat(bool encryption) +{ + ChatPage::instance()->startChat(this->userid_, encryption); +} + void UserProfile::startChat() { - ChatPage::instance()->startChat(this->userid_); + ChatPage::instance()->startChat(this->userid_, std::nullopt); } void -- cgit 1.5.1