Manual fixes for AI slop

This commit is contained in:
binwiederhier
2026-01-06 18:02:08 -05:00
parent 2856793eff
commit 2dd152df3f
11 changed files with 255 additions and 196 deletions

View File

@@ -50,12 +50,23 @@ export const useConnectionListeners = (account, subscriptions, users, webPushTop
};
const handleNotification = async (subscriptionId, notification) => {
if (notification.deleted && notification.sid) {
return handleDeletedNotification(subscriptionId, notification);
}
return handleNewOrUpdatedNotification(subscriptionId, notification);
};
const handleNewOrUpdatedNotification = async (subscriptionId, notification) => {
const added = await subscriptionManager.addNotification(subscriptionId, notification);
if (added) {
await subscriptionManager.notify(subscriptionId, notification);
}
};
const handleDeletedNotification = async (subscriptionId, notification) => {
await subscriptionManager.deleteNotificationBySid(subscriptionId, notification.sid);
};
const handleMessage = async (subscriptionId, message) => {
const subscription = await subscriptionManager.get(subscriptionId);
@@ -231,7 +242,9 @@ export const useIsLaunchedPWA = () => {
useEffect(() => {
if (isIOSStandalone) {
return () => {}; // No need to listen for events on iOS
return () => {
// No need to listen for events on iOS
};
}
const handler = (evt) => {
console.log(`[useIsLaunchedPWA] App is now running ${evt.matches ? "standalone" : "in the browser"}`);