Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: timestamp shows yesterday for a message received 3 days ago #13506

Conversation

caybro
Copy link
Member

@caybro caybro commented Feb 12, 2024

What does the PR do

Fixes wrong message timestamp in a channel when the relative date changes (due to time going over midnight, HW clock skews or timezone/DST changes)

  • introduce one global update timer, to be used in various components for date/time sensitive updates
  • this timer runs only when the app is/becomes active
  • use the timer's triggered() signal to update the timestamp label when needed; ie. if it's to display a relative timestamp and it's currently visible

Fixes #11460

Affected areas

StatusTimeStampLabel

Screenshot of functionality (including design for comparison)

  • I've checked the design and this PR matches it

Before midnight:
Snímek obrazovky z 2024-02-11 23-59-58

After midnight:
Snímek obrazovky z 2024-02-12 00-00-06

@status-im-auto
Copy link
Member

status-im-auto commented Feb 12, 2024

Jenkins Builds

Click to see older builds (16)
Commit #️⃣ Finished (UTC) Duration Platform Result
19daf93 #1 2024-02-12 11:53:08 ~4 min macos/aarch64 📄log
19daf93 #1 2024-02-12 11:54:01 ~5 min tests/ui 📄log
✔️ 19daf93 #1 2024-02-12 11:54:30 ~5 min tests/nim 📄log
19daf93 #1 2024-02-12 11:56:08 ~7 min macos/x86_64 📄log
✔️ 19daf93 #1 2024-02-12 12:04:52 ~16 min linux/x86_64 📦tgz
19daf93 #1 2024-02-12 12:13:55 ~25 min windows/x86_64 📄log
✔️ bd13078 #2 2024-02-12 12:20:49 ~4 min macos/aarch64 🍎dmg
✔️ bd13078 #2 2024-02-12 12:22:22 ~6 min tests/nim 📄log
✔️ bd13078 #2 2024-02-12 12:23:41 ~7 min macos/x86_64 🍎dmg
✔️ 55af6b1 #3 2024-02-12 12:28:34 ~4 min macos/aarch64 🍎dmg
✔️ 55af6b1 #3 2024-02-12 12:30:10 ~5 min tests/nim 📄log
✔️ 55af6b1 #3 2024-02-12 12:33:12 ~8 min macos/x86_64 🍎dmg
✔️ 55af6b1 #3 2024-02-12 12:34:24 ~10 min tests/ui 📄log
✔️ 55af6b1 #3 2024-02-12 12:39:03 ~14 min linux/x86_64 📦tgz
✔️ 55af6b1 #3 2024-02-12 12:57:39 ~33 min tests/e2e 📄log
✔️ 55af6b1 #3 2024-02-12 12:58:20 ~34 min windows/x86_64 💿exe
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 62e0568 #4 2024-02-12 13:19:10 ~4 min macos/aarch64 🍎dmg
✔️ 62e0568 #4 2024-02-12 13:21:25 ~6 min tests/nim 📄log
✔️ 62e0568 #4 2024-02-12 13:22:32 ~7 min macos/x86_64 🍎dmg
✔️ 62e0568 #4 2024-02-12 13:24:41 ~10 min tests/ui 📄log
✔️ 62e0568 #4 2024-02-12 13:28:35 ~14 min linux/x86_64 📦tgz
✔️ 62e0568 #4 2024-02-12 13:41:38 ~26 min windows/x86_64 💿exe
✔️ 62e0568 #4 2024-02-12 13:42:22 ~27 min tests/e2e 📄log
✔️ d8e303d #5 2024-02-12 13:57:47 ~5 min tests/nim 📄log
✔️ d8e303d #5 2024-02-12 13:58:38 ~6 min macos/aarch64 🍎dmg
✔️ d8e303d #5 2024-02-12 13:58:59 ~7 min macos/x86_64 🍎dmg
✔️ d8e303d #5 2024-02-12 14:02:21 ~10 min tests/ui 📄log
✔️ d8e303d #5 2024-02-12 14:07:53 ~16 min linux/x86_64 📦tgz
✔️ d8e303d #5 2024-02-12 14:17:31 ~25 min windows/x86_64 💿exe
✔️ d8e303d #5 2024-02-12 14:18:58 ~27 min tests/e2e 📄log

@caybro caybro force-pushed the 11460-message-timestamp-in-a-channel-shows-yesterday-for-a-message-received-3-days-ago branch 2 times, most recently from bd13078 to 55af6b1 Compare February 12, 2024 12:23
@caybro caybro force-pushed the 11460-message-timestamp-in-a-channel-shows-yesterday-for-a-message-received-3-days-ago branch from 55af6b1 to 62e0568 Compare February 12, 2024 13:14
Copy link
Member

@micieslak micieslak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@caybro caybro force-pushed the 11460-message-timestamp-in-a-channel-shows-yesterday-for-a-message-received-3-days-ago branch from 62e0568 to d8e303d Compare February 12, 2024 13:51
Copy link
Contributor

@alexjba alexjba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@caybro caybro merged commit f778152 into master Feb 12, 2024
8 of 9 checks passed
@caybro caybro deleted the 11460-message-timestamp-in-a-channel-shows-yesterday-for-a-message-received-3-days-ago branch February 12, 2024 14:30
- introduce one global update timer, to be used in various components
for date/time sensitive updates (StatusSharedUpdateTimer)
- this timer runs only when the app is/becomes active
- use the timer's `triggered()` signal to update the timestamp label
when needed; ie. if it's to display a relative timestamp and it's
currently visible

Fixes #11460
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Message timestamp in a channel shows yesterday for a message received 3 days ago
5 participants