- // Give a heads-up that all succeeded
- QMessageBox::information(this,
- tr("Imported highlights"),
- tr("%1 highlight rules successfully imported.").arg(QString::number(localHighlightList.count())));
+ // Give a heads-up that all succeeded, ask about removing old rules
+ //
+ // Hypothetically, someone might use a common set of highlight rules across multiple cores.
+ // This won't matter once client highlights are disabled entirely on newer cores.
+ //
+ // Remove this once client-side highlights are disabled for newer cores.
+ ret = QMessageBox::question(this, tr("Imported highlights"),
+ QString("<p>%1</p></br><p>%2</p>").arg(
+ tr("%1 highlight rules successfully imported.").arg(QString::number(localHighlightList.count())),
+ tr("Clean up old, duplicate highlight rules?")),
+ QMessageBox::Yes | QMessageBox::No,
+ QMessageBox::Yes);
+
+ if (ret != QMessageBox::Yes) {
+ // Only two options, Yes or No, return if not Yes
+ return;
+ }
+
+ // Remove all local highlight rules
+ notificationSettings.setHighlightList({});
+ // Disable local nickname highlighting
+ notificationSettings.setHighlightNick(NotificationSettings::HighlightNickType::NoNick);
+ // Disable nickname sensitivity
+ // This isn't needed to disable local highlights, but it's part of appearing reset-to-default
+ notificationSettings.setNicksCaseSensitive(false);
+
+ // Refresh HighlightSettingsPage in case it was already loaded
+ emit localHighlightsChanged();