ssb: Working toward a more sensible unread indication and user interface for setting read/unread.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 15m5s

This commit is contained in:
2024-12-01 12:56:31 -05:00
parent ba7d1ad35f
commit effb354d1b
4 changed files with 24 additions and 6 deletions

View File

@ -323,13 +323,13 @@ ${JSON.stringify(mention, null, 2)}</pre
}
}
mark_read() {
mark_unread() {
this.dispatchEvent(new CustomEvent('channelsetunread', {
bubbles: true,
composed: true,
detail: {
channel: this.channel,
unread: this.message.rowid + 1,
unread: this.message.rowid,
},
}));
}
@ -640,9 +640,9 @@ ${JSON.stringify(content, null, 2)}</pre
<button class="w3-button w3-theme-d1" @click=${this.react}>
React
</button>
${!content.root ?
${(!content.root && this.message.rowid <= this.channel_unread) ?
html`
<button class="w3-button w3-theme-d1" @click=${this.mark_read}>Set Read Here</button>
<button class="w3-button w3-theme-d1" @click=${this.mark_unread}>Mark Unread</button>
` :
undefined}
</p>