mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Cleaner code
This commit is contained in:
parent
aac2afedf5
commit
dbd730487b
3 changed files with 14 additions and 16 deletions
|
@ -180,13 +180,13 @@ void NotificationController::getFakeTwitchChannelLiveStatus(
|
||||||
getApp()->notifications->playSound();
|
getApp()->notifications->playSound();
|
||||||
}
|
}
|
||||||
if (getSettings()->notificationFlashTaskbar) {
|
if (getSettings()->notificationFlashTaskbar) {
|
||||||
|
int flashDuration = 2500;
|
||||||
if (getSettings()->longAlerts) {
|
if (getSettings()->longAlerts) {
|
||||||
QApplication::alert(
|
flashDuration = 0;
|
||||||
getApp()->windows->getMainWindow().window(), 0);
|
|
||||||
} else {
|
|
||||||
QApplication::alert(
|
|
||||||
getApp()->windows->getMainWindow().window(), 2500);
|
|
||||||
}
|
}
|
||||||
|
QApplication::alert(
|
||||||
|
getApp()->windows->getMainWindow().window(),
|
||||||
|
flashDuration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Success;
|
return Success;
|
||||||
|
|
|
@ -408,14 +408,13 @@ void TwitchChannel::setLive(bool newLiveStatus)
|
||||||
getApp()->notifications->playSound();
|
getApp()->notifications->playSound();
|
||||||
}
|
}
|
||||||
if (getSettings()->notificationFlashTaskbar) {
|
if (getSettings()->notificationFlashTaskbar) {
|
||||||
|
int flashDuration = 2500;
|
||||||
if (getSettings()->longAlerts) {
|
if (getSettings()->longAlerts) {
|
||||||
QApplication::alert(
|
flashDuration = 0;
|
||||||
getApp()->windows->getMainWindow().window(), 0);
|
|
||||||
} else {
|
|
||||||
QApplication::alert(
|
|
||||||
getApp()->windows->getMainWindow().window(),
|
|
||||||
2500);
|
|
||||||
}
|
}
|
||||||
|
QApplication::alert(
|
||||||
|
getApp()->windows->getMainWindow().window(),
|
||||||
|
flashDuration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
auto live = makeSystemMessage(this->getName() + " is live");
|
auto live = makeSystemMessage(this->getName() + " is live");
|
||||||
|
|
|
@ -788,13 +788,12 @@ void TwitchMessageBuilder::parseHighlights(bool isPastMsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doAlert) {
|
if (doAlert) {
|
||||||
|
int flashDuration = 2500;
|
||||||
if (getSettings()->longAlerts) {
|
if (getSettings()->longAlerts) {
|
||||||
QApplication::alert(
|
flashDuration = 0;
|
||||||
getApp()->windows->getMainWindow().window(), 0);
|
|
||||||
} else {
|
|
||||||
QApplication::alert(
|
|
||||||
getApp()->windows->getMainWindow().window(), 2500);
|
|
||||||
}
|
}
|
||||||
|
QApplication::alert(getApp()->windows->getMainWindow().window(),
|
||||||
|
flashDuration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue