Fix highlights not showing in mentions (#3801)
This commit is contained in:
@@ -170,11 +170,9 @@ void rebuildUserHighlights(Settings &settings,
|
||||
}
|
||||
|
||||
return HighlightResult{
|
||||
highlight.hasAlert(),
|
||||
highlight.hasSound(),
|
||||
highlightSoundUrl,
|
||||
highlight.getColor(),
|
||||
false, // showInMentions
|
||||
highlight.hasAlert(), highlight.hasSound(),
|
||||
highlightSoundUrl, highlight.getColor(),
|
||||
highlight.showInMentions(),
|
||||
};
|
||||
}});
|
||||
}
|
||||
@@ -344,6 +342,14 @@ std::pair<bool, HighlightResult> HighlightController::check(
|
||||
}
|
||||
}
|
||||
|
||||
if (checkResult->showInMentions)
|
||||
{
|
||||
if (!result.showInMentions)
|
||||
{
|
||||
result.showInMentions = checkResult->showInMentions;
|
||||
}
|
||||
}
|
||||
|
||||
if (result.full())
|
||||
{
|
||||
// The final highlight result does not have room to add any more parameters, early out
|
||||
|
||||
@@ -121,6 +121,22 @@ struct HighlightResult {
|
||||
this->customSoundUrl.has_value() && this->color &&
|
||||
this->showInMentions;
|
||||
}
|
||||
|
||||
friend std::ostream &operator<<(std::ostream &os,
|
||||
const HighlightResult &result)
|
||||
{
|
||||
os << "Alert: " << (result.alert ? "Yes" : "No") << ", "
|
||||
<< "Play sound: " << (result.playSound ? "Yes" : "No") << " ("
|
||||
<< (result.customSoundUrl
|
||||
? result.customSoundUrl.get().toString().toStdString()
|
||||
: "")
|
||||
<< ")"
|
||||
<< ", "
|
||||
<< "Color: "
|
||||
<< (result.color ? result.color->name().toStdString() : "") << ", "
|
||||
<< "Show in mentions: " << (result.showInMentions ? "Yes" : "No");
|
||||
return os;
|
||||
}
|
||||
};
|
||||
|
||||
struct HighlightCheck {
|
||||
|
||||
Reference in New Issue
Block a user