Add showInMentions option for Badge Highlights (#4034)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user