Proper display name retrieval implementation
For any name not found in rooms data, rely on new nio.HttpClient.get_displayname() function to get and cache it, e.g. for our own name if no room is joined and past events from users who left the room. @futurize now returns PyQtFuture objects, wrapper for the concurrent.futures.Future objects that can be used from QML, to ensure name retrieval does not block the GUI.
This commit is contained in:
@@ -6,7 +6,7 @@ import "utils.js" as ChatJS
|
||||
|
||||
RowLayout {
|
||||
id: row
|
||||
spacing: standardSpacing
|
||||
spacing: standardSpacing / 2
|
||||
layoutDirection: isOwn ? Qt.RightToLeft : Qt.LeftToRight
|
||||
anchors.right: isOwn ? parent.right : undefined
|
||||
|
||||
@@ -24,7 +24,7 @@ RowLayout {
|
||||
id: contentLabel
|
||||
text: "<font color='" +
|
||||
(isUndecryptableEvent ? "darkred" : "gray") + "'>" +
|
||||
displayName + " " + contentText +
|
||||
(displayName.value || dict.sender) + " " + contentText +
|
||||
" <font size=" + smallSize + "px color='gray'>" +
|
||||
Qt.formatDateTime(date_time, "hh:mm:ss") +
|
||||
"</font></font>"
|
||||
|
||||
Reference in New Issue
Block a user