Add showInMentions option for Badge Highlights (#4034)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
Felanbird
2022-10-02 07:25:10 -04:00
committed by GitHub
parent 2deed8e1cb
commit 9816722b5e
8 changed files with 97 additions and 38 deletions
@@ -9,7 +9,7 @@ namespace chatterino {
// commandmodel
BadgeHighlightModel::BadgeHighlightModel(QObject *parent)
: SignalVectorModel<HighlightBadge>(5, parent)
: SignalVectorModel<HighlightBadge>(6, parent)
{
}
@@ -28,6 +28,7 @@ HighlightBadge BadgeHighlightModel::getItemFromRow(
return HighlightBadge{
original.badgeName(),
row[Column::Badge]->data(Qt::DisplayRole).toString(),
row[Column::ShowInMentions]->data(Qt::CheckStateRole).toBool(),
row[Column::FlashTaskbar]->data(Qt::CheckStateRole).toBool(),
row[Column::PlaySound]->data(Qt::CheckStateRole).toBool(),
row[Column::SoundPath]->data(Qt::UserRole).toString(),
@@ -42,6 +43,7 @@ void BadgeHighlightModel::getRowFromItem(const HighlightBadge &item,
using Column = BadgeHighlightModel::Column;
setStringItem(row[Column::Badge], item.displayName(), false, true);
setBoolItem(row[Column::ShowInMentions], item.showInMentions());
setBoolItem(row[Column::FlashTaskbar], item.hasAlert());
setBoolItem(row[Column::PlaySound], item.hasSound());
setFilePathItem(row[Column::SoundPath], item.getSoundUrl());