Added functionality of making the flash taskbar last until the app is focused again (#767)
* Added functionality of making the flash taskbar last until chatterino is focused again * added it for every flash taskbar Fixes #760
This commit is contained in:
@@ -180,8 +180,13 @@ void NotificationController::getFakeTwitchChannelLiveStatus(
|
|||||||
getApp()->notifications->playSound();
|
getApp()->notifications->playSound();
|
||||||
}
|
}
|
||||||
if (getSettings()->notificationFlashTaskbar) {
|
if (getSettings()->notificationFlashTaskbar) {
|
||||||
QApplication::alert(
|
if (getSettings()->longAlerts) {
|
||||||
getApp()->windows->getMainWindow().window(), 2500);
|
QApplication::alert(
|
||||||
|
getApp()->windows->getMainWindow().window(), 0);
|
||||||
|
} else {
|
||||||
|
QApplication::alert(
|
||||||
|
getApp()->windows->getMainWindow().window(), 2500);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Success;
|
return Success;
|
||||||
|
|||||||
@@ -408,8 +408,14 @@ void TwitchChannel::setLive(bool newLiveStatus)
|
|||||||
getApp()->notifications->playSound();
|
getApp()->notifications->playSound();
|
||||||
}
|
}
|
||||||
if (getSettings()->notificationFlashTaskbar) {
|
if (getSettings()->notificationFlashTaskbar) {
|
||||||
QApplication::alert(
|
if (getSettings()->longAlerts) {
|
||||||
getApp()->windows->getMainWindow().window(), 2500);
|
QApplication::alert(
|
||||||
|
getApp()->windows->getMainWindow().window(), 0);
|
||||||
|
} else {
|
||||||
|
QApplication::alert(
|
||||||
|
getApp()->windows->getMainWindow().window(),
|
||||||
|
2500);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
auto live = makeSystemMessage(this->getName() + " is live");
|
auto live = makeSystemMessage(this->getName() + " is live");
|
||||||
|
|||||||
@@ -788,8 +788,13 @@ void TwitchMessageBuilder::parseHighlights(bool isPastMsg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (doAlert) {
|
if (doAlert) {
|
||||||
QApplication::alert(getApp()->windows->getMainWindow().window(),
|
if (getSettings()->longAlerts) {
|
||||||
2500);
|
QApplication::alert(
|
||||||
|
getApp()->windows->getMainWindow().window(), 0);
|
||||||
|
} else {
|
||||||
|
QApplication::alert(
|
||||||
|
getApp()->windows->getMainWindow().window(), 2500);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,8 @@ public:
|
|||||||
BoolSetting enableLowercaseLink = {"/links/linkLowercase", true};
|
BoolSetting enableLowercaseLink = {"/links/linkLowercase", true};
|
||||||
|
|
||||||
/// Ignored phrases
|
/// Ignored phrases
|
||||||
QStringSetting ignoredPhraseReplace = {"/ignore/ignoredPhraseReplace", "***"};
|
QStringSetting ignoredPhraseReplace = {"/ignore/ignoredPhraseReplace",
|
||||||
|
"***"};
|
||||||
|
|
||||||
/// Ingored Users
|
/// Ingored Users
|
||||||
BoolSetting enableTwitchIgnoredUsers = {"/ignore/enableTwitchIgnoredUsers",
|
BoolSetting enableTwitchIgnoredUsers = {"/ignore/enableTwitchIgnoredUsers",
|
||||||
@@ -143,6 +144,8 @@ public:
|
|||||||
"/highlighting/whisperHighlight/enableTaskbarFlashing", false};
|
"/highlighting/whisperHighlight/enableTaskbarFlashing", false};
|
||||||
QStringSetting highlightColor = {"/highlighting/color", "#4B282C"};
|
QStringSetting highlightColor = {"/highlighting/color", "#4B282C"};
|
||||||
|
|
||||||
|
BoolSetting longAlerts = {"/highlighting/alerts", false};
|
||||||
|
|
||||||
/// Logging
|
/// Logging
|
||||||
BoolSetting enableLogging = {"/logging/enabled", false};
|
BoolSetting enableLogging = {"/logging/enabled", false};
|
||||||
|
|
||||||
|
|||||||
@@ -149,6 +149,9 @@ HighlightingPage::HighlightingPage()
|
|||||||
|
|
||||||
layout.append(createCheckBox(ALWAYS_PLAY,
|
layout.append(createCheckBox(ALWAYS_PLAY,
|
||||||
getSettings()->highlightAlwaysPlaySound));
|
getSettings()->highlightAlwaysPlaySound));
|
||||||
|
layout.append(createCheckBox(
|
||||||
|
"Flash taskbar only stops highlighting when chatterino is focused",
|
||||||
|
getSettings()->longAlerts));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---- misc
|
// ---- misc
|
||||||
|
|||||||
Reference in New Issue
Block a user