summary refs log tree commit diff
path: root/src/MainWindow.cpp
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-21 14:33:35 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-21 14:33:35 +0300
commit6c65213c83c2516aed1d1ee160fef8bcb9a092b2 (patch)
tree642f6114c2a9c832989cc532481881609960fab9 /src/MainWindow.cpp
parentLower the complexity of the group filtering algorithm (#380) (diff)
downloadnheko-6c65213c83c2516aed1d1ee160fef8bcb9a092b2.tar.xz
Reuse the profile modal & adjust its spacing relative to the font size
Diffstat (limited to 'src/MainWindow.cpp')
-rw-r--r--src/MainWindow.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp

index fe63456a..43de4fe8 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp
@@ -312,13 +312,17 @@ MainWindow::hasActiveUser() void MainWindow::openUserProfile(const QString &user_id, const QString &room_id) { - userProfileDialog_ = QSharedPointer<dialogs::UserProfile>(new dialogs::UserProfile(this)); + if (!userProfileDialog_) + userProfileDialog_ = + QSharedPointer<dialogs::UserProfile>(new dialogs::UserProfile(this)); + userProfileDialog_->init(user_id, room_id); - userProfileModal_ = - QSharedPointer<OverlayModal>(new OverlayModal(this, userProfileDialog_.data())); - userProfileModal_->setContentAlignment(Qt::AlignTop | Qt::AlignHCenter); + if (!userProfileModal_) + userProfileModal_ = + QSharedPointer<OverlayModal>(new OverlayModal(this, userProfileDialog_.data())); + userProfileModal_->setContentAlignment(Qt::AlignTop | Qt::AlignHCenter); userProfileModal_->show(); }