feat: show warning before blocking followed channel (#5615)
This commit is contained in:
@@ -41,6 +41,7 @@ DraggablePopup::DraggablePopup(bool closeAutomatically, QWidget *parent)
|
||||
BaseWindow::ClearBuffersOnDpiChange,
|
||||
parent)
|
||||
, lifetimeHack_(std::make_shared<bool>(false))
|
||||
, closeAutomatically_(closeAutomatically)
|
||||
, dragTimer_(this)
|
||||
|
||||
{
|
||||
@@ -128,4 +129,14 @@ Button *DraggablePopup::createPinButton()
|
||||
return this->pinButton_;
|
||||
}
|
||||
|
||||
bool DraggablePopup::ensurePinned()
|
||||
{
|
||||
if (this->closeAutomatically_ && !this->isPinned_)
|
||||
{
|
||||
this->togglePinned();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user