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

Old pinned messages do not have the right background #16896

Open
jrainville opened this issue Dec 5, 2024 · 0 comments · May be fixed by #16897
Open

Old pinned messages do not have the right background #16896

jrainville opened this issue Dec 5, 2024 · 0 comments · May be fixed by #16897
Assignees
Milestone

Comments

@jrainville
Copy link
Member

Bug Report

Description

When an old message is pinned (old enough to be out of screen when first launching the app, it will appear as a normal message in the list.

Sorry about that is pinned but doesn't appear as such in the message list
Image
Image

Steps to reproduce

  1. Have a chat with enough messages that some messages are offscreen at the top
  2. Scroll up and pin a message
  3. Restart the app
  4. Scroll back up

Expected behavior

The message has the orange background and the pin on it

Actual behavior

The message looks normal

Additional Information

  • Status desktop version: master (5bfa97caaec26ad590604c96097c500a52ca4757)
  • Operating System: Ubuntu 22
@jrainville jrainville added this to the 2.33.0 Beta milestone Dec 5, 2024
@jrainville jrainville self-assigned this Dec 5, 2024
jrainville added a commit that referenced this issue Dec 5, 2024
Fixes #16896

Fixed by keeping a table of the pins in the module and applying the pin to the messages when they are loaded (if applicable)
@jrainville jrainville moved this from Next to In Progress in Status Desktop/Mobile Board Dec 5, 2024
@jrainville jrainville moved this from In Progress to Code Review in Status Desktop/Mobile Board Dec 5, 2024
jrainville added a commit that referenced this issue Dec 6, 2024
Fixes #16896

Fixed by keeping a table of the pins in the module and applying the pin to the messages when they are loaded (if applicable)
@jrainville jrainville changed the title Old pinned messages do not that the right background Old pinned messages do not have the right background Dec 17, 2024
jrainville added a commit that referenced this issue Dec 17, 2024
Fixes #16896

Fixed by keeping a table of the pins in the module and applying the pin to the messages when they are loaded (if applicable)
jrainville added a commit to status-im/status-go that referenced this issue Dec 18, 2024
Needed for status-im/status-desktop#16896

Having `PinnedBy`  directly in the Message object makes it way simpler in the client to know if a message is pinned. This saves us from having to keep a cache of the pinned messages and comparing all new messages.
jrainville added a commit to status-im/status-go that referenced this issue Dec 18, 2024
Needed for status-im/status-desktop#16896

Having `PinnedBy`  directly in the Message object makes it way simpler in the client to know if a message is pinned. This saves us from having to keep a cache of the pinned messages and comparing all new messages.
jrainville added a commit to status-im/status-go that referenced this issue Dec 18, 2024
Needed for status-im/status-desktop#16896

Having `PinnedBy`  directly in the Message object makes it way simpler in the client to know if a message is pinned. This saves us from having to keep a cache of the pinned messages and comparing all new messages.
jrainville added a commit that referenced this issue Dec 18, 2024
Fixes #16896

The problem was that we relied on the `SIGNAL_PINNED_MESSAGES_LOADED` event to apply the pinned status to messages, but that only happens at the start and a lot of messages are not loaded at start if they are not in the first 30 messages.

To fix this, I just added `pinnedBy` to the Message object in status-go. This way, we can easily tell straight from the MessageDto if a message is pinned and by whom.
jrainville added a commit to status-im/status-go that referenced this issue Dec 20, 2024
Needed for status-im/status-desktop#16896

Having `PinnedBy`  directly in the Message object makes it way simpler in the client to know if a message is pinned. This saves us from having to keep a cache of the pinned messages and comparing all new messages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Code Review
Development

Successfully merging a pull request may close this issue.

1 participant