From 1fc230fc103c3c237dd147d7ef6a1d8afc53a592 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Thu, 3 Aug 2023 13:12:01 -0700 Subject: [PATCH] msglist [nfc]: Tighten comments on rendering-only updates Also put them consistently in the terminology found in the API doc. --- lib/model/message_list.dart | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/model/message_list.dart b/lib/model/message_list.dart index 889bce799e..26d01017c2 100644 --- a/lib/model/message_list.dart +++ b/lib/model/message_list.dart @@ -88,15 +88,12 @@ class MessageListView extends ChangeNotifier { } _applyChangesToMessage(UpdateMessageEvent event, Message message) { - // In earlier server versions, omitting the userId indicates that this is a - // rendering-only update. That means this change was initiated by the server, - // not the user. - // // TODO(server-5): Cut this fallback; rely on renderingOnly from FL 114 final isRenderingOnly = event.renderingOnly ?? (event.userId == null); if (event.editTimestamp != null && !isRenderingOnly) { - // Only update the timestamp if this was a user-led update, - // not a server-only update + // A rendering-only update gets omitted from the message edit history, + // and [Message.lastEditTimestamp] is the last timestamp of that history. + // So on a rendering-only update, the timestamp doesn't get updated. message.lastEditTimestamp = event.editTimestamp; }