community: a proposal on your board arrives as a toast, carried sealed through the inbox

This commit is contained in:
KeelrLeek committed 2026-09-03 12:16:33 -05:00
1 parent 4d03cf849b
commit fd216ecd3d
6 files changed
+241 -1

No files matched your search

+6
View File
@@ -8,6 +8,7 @@
// <time>", never "online"; and the adapter's states are named for what they
// are (node stopped, incompatible, connecting), never softened.
import * as api from "./api.js";
import { announceProposal } from "./state.svelte.js";
const LS_SEEN = "community.lastSeen";
const LS_FAVS = "community.roomFavs";
@@ -338,6 +339,11 @@ export async function initCommunity() {
void refreshPublished();
});
api.onEvent("community:overlap", () => void refreshOverlap());
api.onEvent("community:proposal", (p) => {
announceProposal(p.from, p.playlist);
// If the board is already on screen, show what it is talking about.
if (community.board && community.space) void openBoard(community.space.owner, community.space.space_id);
});
api.onEvent("soulseek:user-state", (p) => {
if (p.status === 1 || p.status === 2) noteSeen(p.username);
});