Switch to newDisplayName() and newAvatarUrl()
Removes build warnings that these are deprecated. See libQuotient commit f4db6988bf2fd71f74ac851557d82c6f65cc89b1 for more details.
This commit is contained in:
@@ -367,17 +367,17 @@ QString NeoChatRoom::eventToString(const RoomEvent &evt, Qt::TextFormat format,
|
|||||||
}
|
}
|
||||||
QString text {};
|
QString text {};
|
||||||
if (e.isRename()) {
|
if (e.isRename()) {
|
||||||
if (e.displayName().isEmpty()) {
|
if (!e.newDisplayName().has_value()) {
|
||||||
text = i18n("cleared their display name");
|
text = i18n("cleared their display name");
|
||||||
} else {
|
} else {
|
||||||
text = i18n("changed their display name to %1", e.displayName().toHtmlEscaped());
|
text = i18n("changed their display name to %1", e.newDisplayName()->toHtmlEscaped());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (e.isAvatarUpdate()) {
|
if (e.isAvatarUpdate()) {
|
||||||
if (!text.isEmpty()) {
|
if (!text.isEmpty()) {
|
||||||
text += i18n(" and ");
|
text += i18n(" and ");
|
||||||
}
|
}
|
||||||
if (e.avatarUrl().isEmpty()) {
|
if (!e.newAvatarUrl().has_value()) {
|
||||||
text += i18n("cleared their avatar");
|
text += i18n("cleared their avatar");
|
||||||
} else if (e.prevContent()->avatarUrl) {
|
} else if (e.prevContent()->avatarUrl) {
|
||||||
text += i18n("set an avatar");
|
text += i18n("set an avatar");
|
||||||
|
|||||||
Reference in New Issue
Block a user