about summary refs log tree commit diff
path: root/src/lib/notifications
Commit message (Collapse)AuthorAgeFilesLines
* adjust notifications experiment by removing `canAskAgain` (#4271)Hailey2024-05-301-39/+34
| | | | | * adjust notifications experiment by removing `canAskAgain` * move to `StepFinished` for after onboarding
* Replace getAgent() with reading agent (#4243)dan2024-05-281-5/+5
| | | | | * Replace getAgent() with agent * Replace {agent} with agent
* Disable badge incrementing for DMs (#4088)Hailey2024-05-171-1/+7
| | | | | | | | | | | * disable badge increments for dms * revert decrementing in js for dms * reset badge on read notifications * remove some other code * prevent duplicate notification events
* [🐴] Don't always show notification for everything (#4083)Hailey2024-05-171-1/+3
| | | | | * don't always show a notification * nit
* [🐴] Decrement app badge when opening unread chat (#4040)Hailey2024-05-161-0/+12
| | | | | | | | | * decrement badge count for chats * handle decrement in `useMarkAsRead` * remove async * oops
* add a `Login` notifications request (#4006)Hailey2024-05-131-1/+2
|
* actually register token on permissions change (#3990)Hailey2024-05-131-10/+21
| | | | | | | | | | | * actually register token on permissions change * actually register token on permissions change * get updated permissions every time * remove all usages of `usePermissions` * skip perms check on granted result from request
* Move request for notifications permissions to `HomeReadyScreen` (#3977)Hailey2024-05-131-44/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cleanup the current logic * add statsig logs * implement requests for permissions where needed * oops * let `addPushTokenListener` handle the token registration * place new log event type with the other `notifications` type * place registration next to handler * more organization * only call `gate()` if permission is not yet granted * be more specific to prevent gate pollution * nit * make `token` non-optional in `registerToken` * remove `prevDid`, move `registerPushToken` into `useEffect` * keep it outside actually * nit
* Handle push notifications for DMs (#3895)Hailey2024-05-091-73/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add some better handling for notifications prep merge move `useNotificationsListener` into shell progress better structure only show messages notifications while using app if it is the current account progress only emit on native current chat emitter only show alerts for the current chat type add logs setup handlers * remove event emitter * just needs cleanup * oops * remove unnecessary `queryClient` param * few fixes * cleanup * nit * remove folds * remove comment * simplify if * add back invalidate * comment out other navigations for now * rename type * handle various navigation cases * push to conversation from notification * update badge in all cases except `chat-message` * ensure no duplicate notifications * rm unused `animationOnReplace` * revert to using `goBack` in the conversation header * add todo comment
* [Session] Drill `getAgent` into notifications handlers (#3705)Eric Bailey2024-04-251-1/+4
| | | | | | | | | | | * Drill into notifications handlers (cherry picked from commit 7ac9e500866732e1f2e205bbe96e70db331e5ffb) * Thread getAgent instead --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Fix stale Notifications after push (#3507)dan2024-04-121-0/+4
|
* Make notifications init reactive to queryClient (#3329)dan2024-04-031-46/+58
|
* Track notification open (#3274)dan2024-03-191-0/+2
|
* Clean up some sentry logs (#2630)Eric Bailey2024-01-251-2/+2
| | | | | | | * Change prop name for sentry ingestion * Fix test * Add default object
* Multiple notifications fixes (#2154)Paul Frazee2023-12-091-2/+1
| | | | | | | | | | | | | | | * Dont reset notifications feed on push notification event * Dont separate notifications by read state to avoid jank * On notifications screen focus, check latest and only rerender if not scrolled down * Reuse the cached notifs page when its not stale * Bump ios build number * Improve comments * Change the 'mark all read' condition to avoid firing too early
* Split notification init, add cleanup (#2102)dan2023-12-061-84/+77
| | | | | | | | | | | | | | | | | | | * Inline never-imported export * Remove pretense at handling cleanup * Extract per-session listener to a function * Split notifications.init() from notifications.onSessionLoaded() * Tweak forked code to be more similar * Remove unnecessary guards * Split notifications.onSessionLoaded in two * Always use getAgent() * Remove dep on listenSessionLoaded, add cleanup
* Maintain some feed data to avoid needless glimmers (#2054)Paul Frazee2023-11-301-2/+3
|
* Fix infinite query reloading behavior (reset, not invalidate) (#2031)Paul Frazee2023-11-291-2/+2
| | | | | * Reset, not invalidate, notification queries * Reset, not invalidate, feed queries
* Shell behaviors update (react-query refactor) (#1915)Paul Frazee2023-11-151-7/+7
| | | | | | | | | | | * Move tick-every-minute into a hook/context * Move soft-reset event out of the shell model * Update soft-reset listener on new search page * Implement session-loaded and session-dropped events * Update analytics and push-notifications to use new session system
* Refactor notifications to use react-query (#1878)Paul Frazee2023-11-121-5/+5
| | | | | | | | | | | | | | | | | | | | | | | * Move broadcast channel to lib * Refactor view/com/post/Post and remove temporary 2 components * Add useModerationOpts hook * Refactor notifications to use react-query * Fix: only trigger updates in useModerationOpts when the values have changed * Implement unread notification tracking * Add moderation filtering to notifications * Handle native/push notifications * Remove dead code --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Replace all logs with new loggerEric Bailey2023-11-041-17/+44
|
* Fix immediate TS errorsEric Bailey2023-11-041-10/+9
|
* Fix 1304 refresh notifications when a notif is clicked or received (#1339)Ansh2023-08-301-2/+7
| | | | | | | | | * refresh notifications when a notif is clicked * make notification syncing smarter * allow enabled appview proxy on mobile * put back syncqueue code
* Add analytics event for when the app is opened from a notification (#1270)Paul Frazee2023-08-241-0/+2
| | | | | * Add analytics event for when the app is opened from a notification * Tweak notification ID
* A couple quick notifications fixes (#1262)Paul Frazee2023-08-231-3/+6
| | | | | | | * Create separate .easignore to ensure google-services.json goes to eas * Set the notifications serviceDid according to the session host * Fix types
* [APP-786] Native notifications (#1095)Ansh2023-08-231-0/+101
* move `notifee.ts` to notifications folder * install expo notifications * add UIBackgroundMode `remote-notifications` to app.json * fix notifee import in Debug.tsx * add `google-services.json` * add `development-device` class to eas.json * Add `notifications.ts` for native notification handling * send push token to server * update `@atproto/api` * fix putting notif token to server * fix how push token is uploaded * fix lint * enable debug appview proxy header on all platforms * setup `notifications.ts` to work with app view notifs * clean up notification handler * add comments * update packages to correct versions * remove notifee * clean up code a lil * rename push token endpoint * remove unnecessary comments * fix comments * Remove old background scheduler * Fixes to push notifications API use * Bump @atproto/api@0.6.6 --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>