Skip to content

Commit dfd154f

Browse files
committed
edited:
1 parent 4ab6f66 commit dfd154f

File tree

1 file changed

+9
-3
lines changed
  • services/static-webserver/client/source/class/osparc/conversation

1 file changed

+9
-3
lines changed

services/static-webserver/client/source/class/osparc/conversation/MessageUI.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,16 @@ qx.Class.define("osparc.conversation.MessageUI", {
154154

155155
const userName = this.getChildControl("user-name");
156156

157-
const date = new Date(message["modified"]);
158-
const date2 = osparc.utils.Utils.formatDateAndTime(date);
157+
const createdDateData = new Date(message["created"]);
158+
const createdDate = osparc.utils.Utils.formatDateAndTime(createdDateData);
159159
const lastUpdate = this.getChildControl("last-updated");
160-
lastUpdate.setValue(date2);
160+
if (message["created"] === message["modified"]) {
161+
lastUpdate.setValue(createdDate);
162+
} else {
163+
const updatedDateData = new Date(message["modified"]);
164+
const updatedDate = osparc.utils.Utils.formatDateAndTime(updatedDateData);
165+
lastUpdate.setValue(createdDate + " (" + this.tr("edited") + " "+ updatedDate + ")");
166+
}
161167

162168
const messageContent = this.getChildControl("message-content");
163169
messageContent.setValue(message["content"]);

0 commit comments

Comments
 (0)