ssb: Don't show messages as unread when not in channels that allow unread status.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 32m29s

This commit is contained in:
Cory McWilliams 2025-06-04 19:56:02 -04:00
parent 72e1b2025c
commit 462b40640c
2 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,5 @@
{
"type": "tildefriends-app",
"emoji": "🦀",
"previous": "&GMCcwEOE3VorFHqMCRi6aS1Ch7u1B7hzW6GH35RaaUI=.sha256"
"previous": "&i6mkfmh4sW8PpILznWL8VxDzI3MX6V5OJWDs47Qxias=.sha256"
}

View File

@ -414,7 +414,7 @@ class TfMessageElement extends LitElement {
class_background() {
return this.message?.decrypted
? 'w3-pale-red'
: this.message?.rowid >= this.channel_unread
: (this.allow_unread() && this.message?.rowid >= this.channel_unread)
? 'w3-theme-d2'
: 'w3-theme-d4';
}
@ -631,8 +631,15 @@ class TfMessageElement extends LitElement {
return result;
}
allow_unread() {
return
!this.channel.startsWith('@') &&
!this.channel.startsWith('%');
}
render_unread_icon() {
return this.message?.rowid >= this.channel_unread ? html`✉️` : undefined;
return this.allow_unread() &&
this.message?.rowid >= this.channel_unread ? html`✉️` : undefined;
}
render() {