feat: show warning before blocking followed channel (#5615)

This commit is contained in:
nerix
2024-11-03 13:29:57 +01:00
committed by GitHub
parent 8220a1fbd4
commit d3000ba597
8 changed files with 93 additions and 52 deletions
+11
View File
@@ -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