Add "pin" action to usercards and reply threads (#4692)
This commit is contained in:
@@ -62,6 +62,11 @@ ReplyThreadPopup::ReplyThreadPopup(bool closeAutomatically, QWidget *parent,
|
||||
}
|
||||
return "";
|
||||
}},
|
||||
{"pin",
|
||||
[this](std::vector<QString> /*arguments*/) -> QString {
|
||||
this->togglePinned();
|
||||
return "";
|
||||
}},
|
||||
|
||||
// these actions make no sense in the context of a reply thread, so they aren't implemented
|
||||
{"execModeratorAction", nullptr},
|
||||
|
||||
@@ -231,6 +231,11 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically, QWidget *parent,
|
||||
this->underlyingChannel_->sendMessage(msg);
|
||||
return "";
|
||||
}},
|
||||
{"pin",
|
||||
[this](std::vector<QString> /*arguments*/) -> QString {
|
||||
this->togglePinned();
|
||||
return "";
|
||||
}},
|
||||
|
||||
// these actions make no sense in the context of a usercard, so they aren't implemented
|
||||
{"reject", nullptr},
|
||||
|
||||
@@ -59,9 +59,9 @@ private:
|
||||
std::unique_ptr<pajlada::Signals::ScopedConnection> refreshConnection_;
|
||||
|
||||
// If we should close the dialog automatically if the user clicks out
|
||||
// Initially set based on the "Automatically close usercard when it loses focus" setting
|
||||
// If that setting is enabled, this can be toggled on and off using the pin in the top-right corner
|
||||
bool closeAutomatically_;
|
||||
// Set based on the "Automatically close usercard when it loses focus" setting
|
||||
// Pinned status is tracked in DraggablePopup::isPinned_.
|
||||
const bool closeAutomatically_;
|
||||
|
||||
struct {
|
||||
Button *avatarButton = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user