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(MessagesList): update date separator overnight #13425

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

DorraJaouad
Copy link
Contributor

☑️ Resolves

  • Fix: when keeping the conversation open overnight, relative dates do not get updated.

🖌️ UI Checklist

🖼️ Screenshots / Screencasts

🏚️ Before 🏡 After
messages list showing two "today", one of them is supposed to be "yesterday" only one correct "today"

🏁 Checklist

  • 🌏 Tested with different browsers / clients:
    • Chromium (Chrome / Edge / Opera / Brave)
    • Firefox
    • Safari
    • Talk Desktop
    • Not risky to browser differences / client
  • 🖌️ Design was reviewed, approved or inspired by the design team
  • ⛑️ Tests are included or not possible
  • 📗 User documentation in https://github.com/nextcloud/documentation/tree/master/user_manual/talk has been updated or is not required

@DorraJaouad DorraJaouad added bug feature: chat 💬 Chat and system messages feature: frontend 🖌️ "Web UI" client labels Oct 1, 2024
@DorraJaouad DorraJaouad added this to the 🖤 Next Major (31) milestone Oct 1, 2024
@DorraJaouad DorraJaouad self-assigned this Oct 1, 2024
@nickvergessen
Copy link
Member

/backport to stable30

@nickvergessen
Copy link
Member

/backport to stable29

Copy link
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

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

After private discussion:

  • move logic to onWindowFocus()
  • use Vue.set() to ensure update is reactive
  • use :key="dateSeparatorLabels[dateTimestamp]" in template if won't update without it

Tried that way, requires 1 minute for browser to grab a changed system time, then click on window trigger re-render

@Antreesy Antreesy changed the title fix(MessgaesList): update date separator overnight fix(MessagesList): update date separator overnight Oct 1, 2024
@DorraJaouad DorraJaouad force-pushed the fix/noid/date-separator-update branch from e0f8c2e to a7fab80 Compare October 1, 2024 10:58
@DorraJaouad DorraJaouad force-pushed the fix/noid/date-separator-update branch from a7fab80 to e891b84 Compare October 1, 2024 11:31
Copy link
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

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

Working after locking/unlocking the screen, as demanded.
Check linter and merge =)

@DorraJaouad DorraJaouad force-pushed the fix/noid/date-separator-update branch from e891b84 to f91e5dd Compare October 1, 2024 18:26
@DorraJaouad DorraJaouad merged commit 247a6b5 into main Oct 1, 2024
46 checks passed
@DorraJaouad DorraJaouad deleted the fix/noid/date-separator-update branch October 1, 2024 18:29
@ShGKme
Copy link
Contributor

ShGKme commented Oct 2, 2024

  • use :key="dateSeparatorLabels[dateTimestamp]" in template if won't update without it

Why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug feature: chat 💬 Chat and system messages feature: frontend 🖌️ "Web UI" client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants