about summary refs log tree commit diff
path: root/src/lib/hooks
Commit message (Collapse)AuthorAgeFilesLines
...
* Pass referrer on native (with an opt out) (#6648)dan2024-11-221-1/+23
| | | | | | | | | | | | | | | | | * Pass referer on native * Add ChainLink3 * Add an opt out for sending utm * Remove noreferrer on links We do have <meta name="referrer" content="origin-when-cross-origin"> in HTML, should be sufficient. * Narrow down the condition slightly --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Add useHandleRef as a lighter alternative for useAnimatedRef (#6500)dan2024-11-181-0/+39
|
* Use compiler-safe Reanimated get/set APIs (#6391)dan2024-11-171-9/+11
| | | | | | | | | | | | | | | | | | | | | * Convert lightbox to get/set * Work around software-mansion/react-native-reanimated#6613 * Use get/set in more places * Port MainScrollProvider to get/set * Port more to get/set * Port composer to get/set * Remove unnecessary thread hops in composer * Port more things to get/set * Convert more to get/set, remove redundant runOnJS * Convert remaining cases to get/set
* Email verification tweaks (date) (#6416)Hailey2024-11-161-2/+3
|
* Tweak email verification dialog (#6397)Hailey2024-11-151-2/+14
|
* Add email verification prompts throughout the app (#6174)Hailey2024-11-121-0/+19
|
* [Settings] Ungate, and remove old settings (#6144)Samuel Newman2024-11-081-14/+0
| | | | | | | | | | | | | | | | | | | * move export car dialog * move disableemail2fadialog * delete old settings screens * fix type error * Update Navigation.tsx * Delete AccountDropdownBtn.tsx * remove old change handle modal * delete add app paswords * forgot to actually delete the change handle modal
* Sort imports (#6009)dan2024-10-2919-30/+37
| | | | | * Mark import sort/order/style rules as error * npm run lint -- --fix
* Present in-app browser as sheet (#5718)Samuel Newman2024-10-111-0/+54
| | | | | | | * use page sheet presentation * move to its own file rather than sitting in prefs * whoops, missed one
* Move intent handler to a child of `InnerApp` (#5695)Hailey2024-10-111-1/+10
|
* Move Dialogs to Radix (#5648)Samuel Newman2024-10-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use Redix FocusTrap (#5638) * Use Redix FocusTrap * force resolutions on radix libs * add focus guards * use @radix-ui/dismissable-layer for escape handling * fix banner menu keypress by using `Pressable` * add menu in dialog example to storybook --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com> * use DismissableLayer/FocusScope for composer * fix storybook dialog * thread Portal through Prompt and avatar/banner * fix dialog style regression * remove tamagui --------- Co-authored-by: Eric Bailey <git@esb.lol>
* [Video] Add dimension info to share intent (#5639)Hailey2024-10-071-1/+2
|
* Remove Segment (#5518)Hailey2024-09-272-17/+12
|
* [Share Extension] Move away from deprecated API, implement JS side of things ↵Hailey2024-09-261-6/+18
| | | | (#5509)
* Milly tweaks (#5365)Eric Bailey2024-09-161-4/+0
| | | | Co-authored-by: Hailey <me@haileyok.com>
* WIPEric Bailey2024-09-111-1/+5
|
* Add intent for verifying email (#5120)Hailey2024-09-071-2/+32
|
* [Video] Add disable autoplay for native, more tweaking (#5178)Hailey2024-09-061-12/+15
|
* Localize dates, counts (#5027)Eric Bailey2024-08-292-75/+278
| | | | | | | | | | | | | | | | | | | | | | | * refactor: consistent localized formatting * refactor: localized date time * refactor: localize relative time with strings * chore: fix typo from copy-paste * Clean up useTimeAgo * Remove old ago * Const * Reuse * Prettier --------- Co-authored-by: Mary <git@mary.my.id>
* Force at least one item to always be initially rendered (#5029)Hailey2024-08-291-1/+6
|
* Profile screen performance tweak - Adjust initial num to render based on ↵Hailey2024-08-291-7/+15
| | | | header height (#5005)
* Fix fixed footer experiment (#4969)dan2024-08-221-27/+18
| | | | | | | | | | | | | | | | | * Split minimal shell mode into headerMode and footerMode For now, we'll always write them in sync. When we read them, we'll use headerMode as source of truth. This will let us keep footerMode independent in a future commit. * Remove fixed_bottom_bar special cases during calculation This isn't the right time to determine special behavior. Instead we'll adjust footerMode itself conditionally on the gate. * Copy-paste setMode into MainScrollProvider This lets us fork the implementation later just for this case. * Gate footer adjustment in MainScrollProvider This is the final piece. Normal calls to setMode() keep setting both header and footer, but MainScrollProvider adjusts the footer conditionally.
* Add `list hidden` screen (#4958)Hailey2024-08-201-0/+23
| | | | | Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Eric Bailey <git@esb.lol>
* [Experiment] Always show bottom bar (#4946)dan2024-08-161-0/+18
|
* useDedupe callback (#4855)GSMT2024-07-301-2/+2
|
* Make all referrer info sync (#4782)Hailey2024-07-121-9/+8
|
* referrers for all platforms (#4514)Hailey2024-07-111-1/+14
|
* Video compression in composer (#4638)Samuel Newman2024-07-052-0/+37
| | | | | Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com> Co-authored-by: Hailey <me@haileyok.com>
* use granular permission of for media perm request (#4609)Hailey2024-06-241-1/+3
|
* Starter Packs (#4332)Hailey2024-06-212-0/+16
| | | | | | | Co-authored-by: Dan Abramov <dan.abramov@gmail.com> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* Force callers of `getTimeAgo` to pass in the value for "now" (#4560)Eric Bailey2024-06-181-13/+4
| | | | | | | * Remove icky hook for now * Force callers of getTimeAgo to pass in the 'now' value * Update usage in Newskie dialog
* Add `useGetTimeAgo` and utils (#4556)Eric Bailey2024-06-182-0/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Create a testable version of ago() and re-enable the disabled test (#4364) * Enable the test of ago() * Use test cases This puts the input and the expected values next to each other. * Create dateDiff function This is a copy of ago(), but with the ability to specify the second date instead of using Date.now(). * Let ago() use dateDiff() * Move constants close to usage * Test dateDiff instead of ago This makes it possible to test the dates without being forced to rely on what the current date is. The commented out tests do not yet pass. This is fixed in later commits. * Update dateDiff and enable the remaining tests * Split up tests, use date-fns as helpers * Remove old test * Add long format * Add hook * Migrate to hooks * Delete old code * Or equal to * Update comment --------- Co-authored-by: Jan Aagaard <jan@aagaard.net>
* Move feeds screen into common navigator, handle usages (#4365)Eric Bailey2024-06-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move feeds screen into common navigator, handle usages * Add link to Feeds from home screen (#4366) * Add link to feeds to home screen header * Center logo * Replace icons * Tweak spacing * Tweak spacing * Swap icon, sizing * Buttonize, size * Make menu same alignment on all screens * Remove FeedsTab support, enable drawer swipe on MessagesTab * Add note * Vertically align header * Swap in Pin * Use hashtag icon * Remove png * Fix reference * Ensure alignment with home and other screens
* Fix (#4430): Use separate hooks for shell mode animated styles (#4451)Francesco Lodovici2024-06-101-14/+27
| | | | | | | | | * Fix (#4430): Use separate hooks for shell mode animated styles * Consolidate in one file --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Bump more Expo libs (#4251)dan2024-05-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Bump more Expo libs * Use legacy camera API * fix `expo-notifications` patch * bump `menu` * change patch name * patch reanimated * Revert "patch reanimated" This reverts commit dad822d8ea04c71a609784114d60f2e67b78290b. * Use nightly reanimated * Revert "Use nightly reanimated" This reverts commit 6687c7182883feb889cbf2c67dd14890e06bc501. * Revert "Revert "patch reanimated"" This reverts commit c30abd6732f559ca04dc59698411e1058800d63e. --------- Co-authored-by: Hailey <me@haileyok.com>
* Upgrade to Expo 51 and React Native 0.74 (#3980)Hailey2024-05-291-56/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upgrade packages * remove `expo-image-picker` patch * remove old expo-updates patch * rename rn patch * downgrade crop picker * bump `ExpoGifView` `SDWebImage` version * apply config changes * update build docs for apple silicon * update build docs for apple silicon * update expo-updates patch * add back patch readme * bump `expo-dev-client` * bump `babel-preset` * update `babel.config.js` * update `react-native-paste-input` patch * remove old ota updates hook * update types * update types * downgrade pager-view * update animated ref type * fix web-only type * update `react-native-bottom-sheet` `BottomSheetTextInput` * add `expo-application` to jest mocks * remove reanimated patch * update notifications patch * update reanimated path * fix import * update yarn.lock * use `ItemT` instead of `any` * expo bump * Revert logic change, fix types * Fix JSON file --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [🐴] update convo list from message bus (#4189)Samuel Newman2024-05-241-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | * update convo list from message bus * don't increase unread count if you're the sender * add refetch interval back * Fix deleted message state copy * only enable if `hasSession` * Fix logged out handling * increase refetch interval to 60s * request 10s interval when message screen active * use useAppState hook for convo resume/background * Combine forces * fix useFocusEffect logic --------- Co-authored-by: Eric Bailey <git@esb.lol>
* [🐴] Reset screen when pressing a DM notification while already in the ↵Hailey2024-05-181-4/+26
| | | | | | | conversation screen (#4091) * add a small comment * reset if current screen
* Disable badge incrementing for DMs (#4088)Hailey2024-05-171-9/+6
| | | | | | | | | | | * 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/+1
| | | | | * don't always show a notification * nit
* [🐴] Decrement app badge when opening unread chat (#4040)Hailey2024-05-161-2/+3
| | | | | | | | | * decrement badge count for chats * handle decrement in `useMarkAsRead` * remove async * oops
* Handle failed resumeSession case when switching accounts (#4047)Eric Bailey2024-05-161-0/+5
|
* Add push notification extensions (#4005)Hailey2024-05-151-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add wav * add sound to config * add extension to `updateExtensions.sh` * add ios source files * add a build extension * add a new module * use correct type on ios * update the build plugin * add android handler * create a patch for expo-notifications * basic android implementation * add entitlements for notifications extension * add some generic logic for ios * add age check logic * add extension to app config * remove dash * move directory * rename again * update privacy manifest * add prefs storage ios * better types * create interface for setting and getting prefs * add notifications prefs for android * add functions to module * add types to js * add prefs context * add web stub * wrap the app * fix types * more preferences for ios * add a test toggle * swap vars * update patch * fix patch error * fix typo * sigh * sigh * get stored prefs on launch * anotehr type * simplify * about finished * comment * adjust plugin * use supported file types * update NSE * futureproof ios * futureproof android * update sound file name * handle initialization * more cleanup * update js types * strict js types * set the notification channel * rm * add silent channel * add mute logic * update patch * podfile * adjust channels * fix android channel * update readme * oreo or higher * nit * don't use getValue * nit
* [🐴] Adjust messages list styles (#3945)Hailey2024-05-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * some initial tweaks * tweaks * more tweaks * tweak chat header * properly align placeholders * tweak web header * one more... * remove extra loading states from chat * limit line count for display name * Tweaks styles (#3949) * Adjust sizing * Consistent font size * Adjust header * oops * fix accessibility in list * don't use `identifier` for notifications, use `dates` instead --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Handle push notifications for DMs (#3895)Hailey2024-05-091-0/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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] Code cleanup (#3854)dan2024-05-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Split utils into files * Move reducer to another file * Write types explicitly * Remove unnnecessary check * Move things around a bit * Move more stuff into agent factories * Move more stuff into agent * Fix gates await * Clarify comments * Enforce more via types * Nit * initSession -> resumeSession * Protect against races * Make agent opaque to reducer * Check using plain condition
* [Session] Align state and global agent switchpoints (#3845)dan2024-05-031-10/+2
| | | | | | | | | | | | | * Adopt synced accounts unconditionally * Remove try/catch around resuming session * Move to login form on resume failure * Restructure code flow for easier reading --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Don't clear toasts when changing users (#3843)dan2024-05-031-6/+1
| | | | | | | | | | | * Move ThemeProvider to the top * Move RootSiblingParent above the remounted part * Move ToastContainer outside the remounted part * Remove setTimeout around toasts * Consistently handle dropped session
* Improve account switcher pending state (#3827)dan2024-05-021-6/+16
| | | | | | | | | * Protect against races * Reduce UI jank when switching accounts * Add pending state to selected account * Disable presses while pending
* rename "MessagesList" to "Messages" (#3826)Samuel Newman2024-05-022-1/+4
|