Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Add a counter for unread pins and highlight unread pins in pin menu.#31

Merged
7w1 merged 5 commits intodevfrom
unread-pins
Feb 27, 2026
Merged

Add a counter for unread pins and highlight unread pins in pin menu.#31
7w1 merged 5 commits intodevfrom
unread-pins

Conversation

@7w1
Copy link
Copy Markdown
Owner

@7w1 7w1 commented Feb 27, 2026

Description

Replaced the pin counter with the number of unread pins and added a subtle outline to unread messages in the pin list.

image

Closes #25 using the described implementation until MSC4238 is discussed further/merged.

Stores the following to room account data under the key moe.sable.app.pins_read_marker

{
    "hash": "a3f9b2c1d4",
    "count": 7,
    "last_seen_id": "$abc123"
}

If the last seen ID is unpinned, it relies on the count to determine which pins to highlight/number to show, subtracting one from the stored count (because that last seen message was unpinned), and then continues to render the number/highlight based on that. This method DOES NOT work when the last seen pin was unpinned in addition to other pins, and will result in any additional pins less than the unpinned pins count being missed.

I unfortunately do not see any way around that issue without keeping track of every single pin message id, which I'd like to avoid.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@7w1 7w1 merged commit 77e237e into dev Feb 27, 2026
@7w1 7w1 deleted the unread-pins branch February 27, 2026 07:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unread indicator for pinned messages

1 participant