mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-05-02 11:32:35 +02:00
feat(channels): sort sidebar by latest activity, with favorite tier
Channels in the sidebar and mobile dropdown now sort by most recent message first, with favorited channels pinned above non-favorites. Reordering is push-driven via the existing new_message socket event: the affected item is moved to the top of its tier in the DOM, no full re-render. Favorites are toggled via a star icon in Manage Channels and persisted in read_status.is_favorite for cross-device sync. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -164,6 +164,7 @@ CREATE TABLE IF NOT EXISTS read_status (
|
||||
key TEXT PRIMARY KEY, -- 'chan_0', 'dm_<pubkey>', etc.
|
||||
last_seen_ts INTEGER DEFAULT 0, -- unix timestamp
|
||||
is_muted INTEGER DEFAULT 0, -- 1 = muted (channels only)
|
||||
is_favorite INTEGER DEFAULT 0, -- 1 = favorite (channels only)
|
||||
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user