···105105 <div className="flex flex-col justify-start">
106106 <div className="font-bold">Show Mentions</div>
107107 <div className="text-tertiary text-sm leading-tight">
108108- Display a list Bluesky mentions about your post
108108+ Display a list of Bluesky mentions about your post
109109 </div>
110110 </div>
111111 </Toggle>
+18
appview/index.ts
···109109 data: record.value as Json,
110110 });
111111 if (docResult.error) console.log(docResult.error);
112112+ if (record.value.postRef?.uri) {
113113+ await inngest.send({
114114+ name: "appview/sync-bsky-likes",
115115+ data: {
116116+ document_uri: evt.uri.toString(),
117117+ bsky_post_uri: record.value.postRef.uri,
118118+ },
119119+ });
120120+ }
112121 if (record.value.publication) {
113122 let publicationURI = new AtUri(record.value.publication);
114123···269278 data: record.value as Json,
270279 });
271280 if (docResult.error) console.log(docResult.error);
281281+ if (record.value.bskyPostRef?.uri) {
282282+ await inngest.send({
283283+ name: "appview/sync-bsky-likes",
284284+ data: {
285285+ document_uri: evt.uri.toString(),
286286+ bsky_post_uri: record.value.bskyPostRef.uri,
287287+ },
288288+ });
289289+ }
272290273291 // site.standard.document uses "site" field to reference the publication
274292 // For documents in publications, site is an AT-URI (at://did:plc:xxx/site.standard.publication/rkey)
+17-4
components/Canvas.tsx
···2424import { useHandleCanvasDrop } from "./Blocks/useHandleCanvasDrop";
2525import { useBlockMouseHandlers } from "./Blocks/useBlockMouseHandlers";
2626import { RecommendTinyEmpty } from "./Icons/RecommendTiny";
2727+import { useSubscribe } from "src/replicache/useSubscribe";
2828+import { mergePreferences } from "src/utils/mergePreferences";
27292830export function Canvas(props: {
2931 entityID: string;
···164166165167const CanvasMetadata = (props: { isSubpage: boolean | undefined }) => {
166168 let { data: pub, normalizedPublication } = useLeafletPublicationData();
169169+ let { rep } = useReplicache();
170170+ let postPreferences = useSubscribe(rep, (tx) =>
171171+ tx.get<{
172172+ showComments?: boolean;
173173+ showMentions?: boolean;
174174+ showRecommends?: boolean;
175175+ } | null>("post_preferences"),
176176+ );
167177 if (!pub || !pub.publications) return null;
168178169179 if (!normalizedPublication) return null;
170170- let showComments = normalizedPublication.preferences?.showComments !== false;
171171- let showMentions = normalizedPublication.preferences?.showMentions !== false;
172172- let showRecommends =
173173- normalizedPublication.preferences?.showRecommends !== false;
180180+ let merged = mergePreferences(
181181+ postPreferences || undefined,
182182+ normalizedPublication.preferences,
183183+ );
184184+ let showComments = merged.showComments !== false;
185185+ let showMentions = merged.showMentions !== false;
186186+ let showRecommends = merged.showRecommends !== false;
174187175188 return (
176189 <div className="flex flex-row gap-3 items-center absolute top-6 right-3 sm:top-4 sm:right-4 bg-bg-page border-border-light rounded-md px-2 py-1 h-fit z-20">