Announce reference change if names are empty, #4830

This commit is contained in:
Michael Krasnyk
2018-01-26 08:35:11 -05:00
parent d706696179
commit 1119a542d6
4 changed files with 9 additions and 5 deletions
+3 -1
View File
@@ -160,7 +160,9 @@ inline bool requiresNameAnnounced(const StringView &from_name,
const auto needs_announce =
// " (Ref)" -> "Name " and reverse
(from_name.empty() && !from_ref.empty() && !to_name.empty() && to_ref.empty()) ||
(!from_name.empty() && from_ref.empty() && to_name.empty() && !to_ref.empty());
(!from_name.empty() && from_ref.empty() && to_name.empty() && !to_ref.empty()) ||
// ... or names are empty but reference changed
(names_are_empty && !ref_is_contained);
const auto pronunciation_changes = from_pronunciation != to_pronunciation;