Add lastChecked time to all new messages
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2024-02-26 19:31:09 -08:00
parent 058fba7e69
commit b64b99b510
Signed by: sarah
GPG Key ID: F27FD21A270837EF
1 changed files with 1 additions and 0 deletions

View File

@ -128,6 +128,7 @@ class MessageCache extends ChangeNotifier {
void addNew(String profileOnion, int conversation, int messageID, DateTime timestamp, String senderHandle, String senderImage, bool isAuto, String data, String contenthash) {
this.cache[messageID] = MessageInfo(MessageMetadata(profileOnion, conversation, messageID, timestamp, senderHandle, senderImage, "", {}, false, false, isAuto, contenthash), data);
this.cache[messageID]?.metadata.lastChecked =; // Don't check straight away...
this.cacheByIndex.insert(0, LocalIndexMessage(messageID));
if (contenthash != "") {
this.cacheByHash[contenthash] = messageID;