about summary refs log tree commit diff
path: root/src/state
Commit message (Collapse)AuthorAgeFilesLines
...
* | [Clipclops] Clop menu, leave clop, mute/unmute clop (#3804)Samuel Newman2024-05-024-18/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * convo menu * memoize convomenu * add convoId to useChat + memoize value * leave convo * Create mute-conversation.ts * add mutes, remove changes to useChat and use chat.convo instead * add todo comments * leave convo confirm prompt * remove dependency on useChat and pass in props instead * show menu on long press * optimistic update * optimistic update leave + add error capture * don't `popToTop` when unnecessary --------- Co-authored-by: Hailey <me@haileyok.com>
* | [Clipclops] Pending messages (#3803)Eric Bailey2024-05-011-10/+18
| | | | | | | | | | | | | | * Make pending message like normal message * Remove getter * Make props public
* | Retry clops (#3800)Eric Bailey2024-05-013-83/+213
| | | | | | | | | | | | | | * Add convo retries, sketch out tests * Only append nextMessage to messages * Remove debug code
* | [Clipclops] 2 Clipped 2 Clopped (#3796)Eric Bailey2024-05-017-0/+636
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add new pkg * copy queries over to new file * useConvoQuery * useListConvos * Use useListConvos * extract useConvoQuery * useGetConvoForMembers * Delete unused * exract useListConvos * Replace imports * Messages/List/index.tsx * extract getconvoformembers * MessageItem * delete chatLog and rename query.ts * Update import * Clipclop service (#3794) * Add Chat service * Better handle deletions * Rollback unneeded changes * Better insertion order * Use clipclops * don't show FAB if error * clean up imports * Update Convo service * Remove temp files --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* | [Session] Derive currentAccount from accounts + currentAccountDid (#3795)dan2024-05-011-22/+28
| | | | | | | | | | * Derive currentAccount from accounts and currentAccountDid * Add TODOs for divergence with __globalAgent
* | [Session] Use flag on state for persistence (#3793)dan2024-05-012-48/+45
| | | | | | | | | | | | | | | | | | * Move isInitialLoad and isSwitchingAccounts out of main state * Remove spreads, order object keys * Track need to persist on state object * Reoder state variables
* | Add kawaii mode (#3773)Samuel Newman2024-05-014-5/+60
| |
* | Memoize context value (#3786)dan2024-05-011-5/+3
| |
* | Performance improvements: structural sharing & moderation opts context (#3785)Paul Frazee2024-04-307-53/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | * Fix: correctly apply structural sharing to preferences object * Move moderation opts into a context * Fix import * Remove log * Pass userdid directly * Pass moderationPrefs directly
* | [Session] Refactor to prepare for V2 (#3781)dan2024-05-015-331/+398
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move types to another file Co-authored-by: dan <dan.abramov@gmail.com> * Move utilities out Co-authored-by: dan <dan.abramov@gmail.com> * Move PUBLIC_BSKY_AGENT Co-authored-by: dan <dan.abramov@gmail.com> * Move createPersistSessionHandler inline Co-authored-by: dan <dan.abramov@gmail.com> * Call configureModeration when clearing account too This ensures that the app labelers get reset in a test environment. Co-authored-by: dan <dan.abramov@gmail.com> * Make guest configureModeration sync, non-guest async * Extract isSessionExpired Co-authored-by: dan <dan.abramov@gmail.com> * Flip isSessionExpired condition Co-authored-by: dan <dan.abramov@gmail.com> * Extract agentToSessionAccount Co-authored-by: dan <dan.abramov@gmail.com> * Extract createAgent* Co-authored-by: dan <dan.abramov@gmail.com> * Simplify isSessionExpired --------- Co-authored-by: Eric Bailey <git@esb.lol>
* | [Session] Move deactivated field off the session object (#3780)dan2024-05-011-3/+4
| |
* | [Session] Consistently copy SessionAgent fields (#3779)dan2024-05-011-5/+7
| | | | | | Co-authored-by: Eric Bailey <git@esb.lol>
* | Session fixes, pt. 1 (#3762)dan2024-04-302-10/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update persisted schema for new source of truth, implement in existing session (cherry picked from commit b1e5f12baee932721d66c60dd51c981b46b0c274) * Improve toasts, log caught error, during switch account (cherry picked from commit fe0d1507063d2e532b7b1a447670b689292d1dc3) * Handle thrown errors from initSession during login (cherry picked from commit 2c85c045917e923901284b9ba310a82e28f37b5c) --------- Co-authored-by: Eric Bailey <git@esb.lol>
* | [Clipclops] Add screen to view and send clip clops (#3754)Hailey2024-04-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add new routes with placeholder screens * add clops list * add a clop input * add some better padding to the clops * some more adjustments * add rnkc * implement rnkc * implement rnkc * be a little less weird about it * rename clop stuff * rename more clop * one more * [Clipclops] Temp codegenerated lexicon (#3749) * add codegenerated lexicon * replace hailey's types * use codegen'd types in components * fix error + throw if fetch failed * remove bad imports * update messageslist and messageitem * import useState * add clop service URL hook * add dm service url storage * use context * use context for service url (temp) * remove log * nits --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* | Send Bluesky feeds and suggested follows more data (#3695)Eric Bailey2024-04-292-9/+36
|/ | | | | | | | | | | | | | | | | * WIP * Fix constructors * Clean up * Tweak * Rm extra assignment * Narrow down the argument --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* remove precacheThreadPostProfiles (#3729)Hailey2024-04-273-62/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove `precacheThreadPostProfiles` * add `displayName` to `PreviewableUserAvatar` * memo * use `precacheProfile` * pass `profile` directly to `PreviewableUserAvatar` * update the `UserAvatar`'s props * remove feed cache * one more spot * rm unused queryClient * Don't call fn unnecessarily * Preload for display name too * try notification item * add to feeditem * and finally, precache for post threads * timestamp * Fix * onBeforePress --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Improve usability of search on web (#3663)Hailey2024-04-271-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dont select the text on web * TODO REVERT THESE CHANGES * use `usethrottledvalue` for autocomplete * use `isFetching` from query * rm setTimeout * getting there * improve functionality of cancel button * rm todo * add comment back * encode `searchText` rather than `queryTerm` * use "back" on web in some cases * don't flash results in autocomplete * remove unnecesary usestate * rename everything to `query` temporarily * revert accidental lint * rm todo * rm comment * use `useFocusEffect` to update the query term on back navigation * `searchText` is always defined here * Fix race * remove back functionality * use `keepPreviousData` for query * rename `q` to `queryParam` * remove hack * remove `q=` on cancel * blur on submit * use `setParams` instead of `replace` * use `replace` on web still * clear the search input when we clear `q` on native * onPress dismiss attempt * Adjustments * Fix search history * Always hide autocomplete * Clear right pane search on select * `blur` on autosuggestion press * Rename to reduce diff * Fixes * Unify codepaths * Fixes * precache the autosuggestion * do the cache in the link card * Revert "precache the autosuggestion" This reverts commit 79c433e984621ba4231a2a4c4b3f4690b0516b4d. * use `throttledValue` and `keepPreviousData` in sidebar search * show spinner when fetching pt 1 * show spinner when fetching pt 2 * show spinner properly for autocomplete * Fix extra border * Position fixed * TS * Revert "TS" This reverts commit df187ea2d7a96d0f1832bc2392215f4d969a87c9. * Revert "Position fixed" This reverts commit 9c721c952b0fa4e5e4a23de38cab916ab13397e6. * Maybe fix iPad * Revert "TODO REVERT THESE CHANGES" This reverts commit 279f717f3091c9df8c73ba35f9a038e12f5a1122. * Rename var --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [Session] Add `useAgent` hook and replace (#3706)Eric Bailey2024-04-2532-44/+127
| | | | | | | | | | | * Hook it up * Memoize getAgent method * Use one shared reference --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [Session] Drill `getAgent` into `notifications/utils` (#3703)Eric Bailey2024-04-253-9/+16
| | | | | | | | | | | * Drill into notifications/util (cherry picked from commit 84b535ed54f4fe93debcd198809bb184519c3507) * Thread getAgent instead --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [Session] Drill into `getAgent` into `whenAppViewReady` (#3702)Eric Bailey2024-04-252-20/+45
| | | | | | | | | | | * Drill into whenAppViewReady (cherry picked from commit e290e5be3df509bdd9d0e626a164996c9dee3636) * Drill getAgent instead --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [Session] Drill `getAgent` into feed APIs (#3701)Eric Bailey2024-04-251-16/+30
| | | | | | | | | | | * Update to desired post-feed usage * Drill agent into feed apis * Thread getAgent instead --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [Session] Base (#3541)Eric Bailey2024-04-252-1/+9
| | | | | * Add readLastActiveAccount to use accounts[] as source of truth * Add public service constant, use
* Persist PDS URL for session resumption (#3620)Mary2024-04-242-4/+21
| | | | | | | | | | | * fix: store PDS URL for session resumption * fix: handle a few more cases * fix: blocking resumption should also use pds url * refactor: do it in the construct itself * fix: revert ce96223
* Remove old Suggested Follows logic (#3689)dan2024-04-241-25/+0
|
* Disable autoplay by default if prefers-reduced-motion (#3671)dan2024-04-231-2/+2
|
* Email auth factor (#3602)Paul Frazee2024-04-223-3/+15
| | | | | | | | | | | | | | | * Add email 2fa toggle * Add UI elements needed for 2fa codes in login * Wire up to the server * Give a better failure message for bad 2fa code * Handle enter key in login form 2fa field * Trim spaces * Improve error message
* rm country param (#3653)Samuel Newman2024-04-231-4/+0
|
* [GIFs] Replace GIPHY with Tenor (#3651)Samuel Newman2024-04-222-280/+177
| | | | | | | | | * replace GIPHY with Tenor * remove "directly" wording * replace GIPHY wording * remove log
* Add disable autoplay preference and group related settings into a dedicated ↵Samuel Newman2024-04-193-3/+52
| | | | | | | | | | | | | | | page (#3626) * add autoplay preference * group accessibility settings into a dedicated page * fix gray background on web * Put a11y first --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [Statsig] Update experiments (#3617)dan2024-04-191-1/+1
|
* Add GIF select to composer (#3600)Samuel Newman2024-04-192-2/+286
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * create dialog with flatlist in it * use alf for composer photos/camera/gif buttons * add gif icons * focus textinput on gif dialog close * add giphy API + gif grid * web support * add consent confirmation * track gif select * desktop web consent styles * use InlineLinkText instead of Link * add error/loading state * hide sideborders on web * disable composer buttons where necessary * skip cardyb and set thumbnail directly * switch legacy analytics to statsig * remove autoplay prop * disable photo/gif buttons if external media is present * memoize listmaybeplaceholder * fix pagination * don't set `value` of TextInput, clear via ref * remove console.log * close modal if press escape * pass alt text in the description * Fix typo * Rm dialog --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [Statsig] Slightly block the UI on gates (#3608)dan2024-04-181-1/+14
|
* [Statsig] Make gate checks lazily (#3594)dan2024-04-181-6/+5
|
* delete useMyFollowsQuery (#3529)Samuel Newman2024-04-172-80/+3
|
* add sort to searchPosts request (#3581)Samuel Newman2024-04-161-12/+7
|
* bump api, remove `as number` from types (#3580)Hailey2024-04-161-4/+3
| | | | | * bump api, remove `as number` from types * bump dev env
* Improve the language behaviors around the PWI (#3545)Paul Frazee2024-04-132-1/+15
| | | | | | | | | * Handle leftnav overflow with longer languages' copy * Update the language dropdown to set ALL language prefs * Add hackfix to language cachebusting on PWI * Reset feeds on language change
* Fix Android in-app browser closing when switching apps (#3546)Nick Manos2024-04-131-3/+5
|
* cache fix for search post results (#3520)Hailey2024-04-121-0/+4
|
* Profile card hover preview (#3508)Eric Bailey2024-04-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: initial user card hover * feat: flesh it out some more * fix: initialize middlewares once * chore: remove floating-ui react-native * chore: clean up * Update moderation apis, fix lint * Refactor profile hover card to alf * Clean up * Debounce, fix positioning when loading * Fix going away * Close on all link presses * Tweak styles * Disable on mobile web * cleanup some of the changes pt. 1 * cleanup some of the changes pt. 2 * cleanup some of the changes pt. 3 * cleanup some of the changes pt. 4 * Re-revert files * Fix handle presentation * Don't follow yourself, silly * Collapsed notifications group * ProfileCard * Tree view replies * Suggested follows * Fix hover-back-on-card edge case * Moar --------- Co-authored-by: Mary <git@mary.my.id> Co-authored-by: Hailey <me@haileyok.com>
* PWI improvements (#3489)Paul Frazee2024-04-122-7/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Enable home and feeds on the PWI * Add global SigninDialog to drive useRequireAuth() * Tweak desktop styles * Make the logo in leftnav PWI a clickable home link * Add label * Improve dialog on web * Fix query key * Go to home after signout from settings screen * Filter out feeds from the discover listing for logged out users which are known to break without auth * Update profile header follow/subscribe to give signin prompt * Show profile feeds tabs on pwi * Add language selector to account creation footer and pwi left nav desktop --------- Co-authored-by: dan <dan.abramov@gmail.com>
* Fix stale Notifications after push (#3507)dan2024-04-121-7/+27
|
* QT Jump Pt. 2 - Remove code duplication (#3506)Hailey2024-04-121-9/+2
| | | | | * remove code duplication * now it's safe to remove shimmer
* Fix optimistic like/repost (#3503)dan2024-04-121-14/+18
|
* add `likeCount` etal. to `embedViewRecordToPostView` (#3500)Hailey2024-04-121-1/+5
| | | | | | | | | | | | | | | | | | | * fix qt jumps Revert "don't show loading placeholder if we don't need it" This reverts commit 406f801f217b2733fdd82732c0af74186fc47464. don't show loading placeholder if we don't need it add `likeCount` etal. to `embedViewRecordToPostView` * lint * Revert the shimmer change --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Improve Android haptic, offer toggle for haptics in the app (#3482)Hailey2024-04-114-4/+54
| | | | | | | | | | | | | | | * improve android haptics, offer toggle for haptics * update haptics.ts * default to false * simplify to `playHaptic` * just leave them as `feedInfo` * use a hook for `playHaptic` * missed one of them
* Search - only enable queries once tab is active (#3471)Samuel Newman2024-04-102-5/+14
| | | | | | | * only enable queries once tab is active * remove hasBeenTrue hook * make enabled optional
* Search - extra tabs (#3408)Samuel Newman2024-04-101-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | * add extra tab to search and translate tab names * add feature gate * flatten pager children * Revert "flatten pager children" This reverts commit 0050d42558c2c9b7bc4f2ad2df4ae2908fa26f65. * have pager children as array * move gate to custom hook * bundle titles and pages together * remove comment * Fix a crash * Use Views as children --------- Co-authored-by: dan <dan.abramov@gmail.com>
* Use ALF for the embed consent modal (#3336)Samuel Newman2024-04-091-8/+0
|
* [Experiment] Ignore the persisted tab (#3442)dan2024-04-081-7/+14
|