From 401e097d622cc0301f5b97381a90f6e29a22582c Mon Sep 17 00:00:00 2001 From: Mm2PL Date: Sat, 9 Dec 2023 13:21:00 +0100 Subject: [PATCH] Hide the Usercard button in the User Info Popup in special channels (#4972) --- CHANGELOG.md | 1 + src/widgets/dialogs/UserInfoPopup.cpp | 14 +++++++++++++- src/widgets/dialogs/UserInfoPopup.hpp | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88558b3c..9bc065e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ - Bugfix: Fixed lookahead/-behind not working in _Ignores_. (#4965) - Bugfix: Fixed Image Uploader accidentally deleting images with some hosts when link resolver was enabled. (#4971) - Bugfix: Fixed rare crash with Image Uploader when closing a split right after starting an upload. (#4971) +- Bugfix: Hide the Usercard button in the User Info Popup when in special channels. (#4972) - Bugfix: Fixed support for Windows 11 Snap layouts. (#4994) - Bugfix: Fixed some windows appearing between screens. (#4797) - Bugfix: Fixed a bug on Wayland where tooltips would spawn as separate windows instead of behaving like tooltips. (#4998) diff --git a/src/widgets/dialogs/UserInfoPopup.cpp b/src/widgets/dialogs/UserInfoPopup.cpp index 4045ed33..e0f1e57f 100644 --- a/src/widgets/dialogs/UserInfoPopup.cpp +++ b/src/widgets/dialogs/UserInfoPopup.cpp @@ -385,7 +385,10 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically, QWidget *parent, user.emplace("Block").assign(&this->ui_.block); user.emplace("Ignore highlights") .assign(&this->ui_.ignoreHighlights); - auto usercard = user.emplace(this); + // visibility of this is updated in setData + + auto usercard = + user.emplace(this).assign(&this->ui_.usercardLabel); usercard->getLabel().setText("Usercard"); auto mod = user.emplace