Fix notes unread status (#7643)

1. The client-side comparison was wrong
2. The server never told the client about the version it remembered
3. The server generated broken timestamps in some cases

Release Notes:

- Fixed the notes/chat appearing as unread too often

**or**

- N/A
This commit is contained in:
Conrad Irwin
2024-02-09 23:12:26 -07:00
committed by GitHub
parent e2a3e89318
commit 68893c2ae6
9 changed files with 157 additions and 120 deletions
+4 -3
View File
@@ -1131,9 +1131,10 @@ impl ChannelState {
if let Some(latest_version) = &self.latest_notes_versions {
if let Some(observed_version) = &self.observed_notes_versions {
latest_version.epoch > observed_version.epoch
|| latest_version
.version
.changed_since(&observed_version.version)
|| (latest_version.epoch == observed_version.epoch
&& latest_version
.version
.changed_since(&observed_version.version))
} else {
true
}