about summary refs log tree commit diff
path: root/src/state
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge branch 'fix-banner-cropper' of ↵Paul Frazee2024-05-061-0/+1
|\ | | | | | | https://github.com/piotrpalek/social-app into piotrpalek-fix-banner-cropper
| * allow for custom cropper aspect ration based on imagePiotr P2024-04-271-0/+1
| |
* | remove trailing period from query term in `useActorAutocompleteQuery` (#3765)Hailey2024-05-061-1/+5
| | | | | | | | | | | | | | | | | | * remove trailing period from query term * Rm useMemo --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* | [Clipclops] All my clops gone (#3850)Eric Bailey2024-05-062-80/+174
| | | | | | | | | | | | | | | | | | * Handle two common errors, provide more clarity around error states * Handle failed polling * Remove unused error type * format
* | [Clipclops] Delete message in dialog (#3849)Hailey2024-05-051-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | * delete and copy * add retry dialog if message send fails * add layout animation * fix `nextMessage` being incorrect --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* | Clipclop tweaks (#3851)Hailey2024-05-031-1/+1
| | | | | | | | | | | | | | * scroll on input resize * add back the padding 🙊 * fix timestamps
* | [Clipclops] Refactor message list (#3832)Hailey2024-05-031-24/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rework the list for accessibility * Reverse reverse * progress * good to start testing * memo `MessageItem` * small hack * use our custom `List` impl * use `ScrollProvider` for `onScroll` event * remove use of `runOnJS` * actually, let's keep it * add some comments --------- Co-authored-by: Eric Bailey <git@esb.lol>
* | add focus refresh + polling (#3846)Samuel Newman2024-05-031-1/+2
| |
* | [Session] Align state and global agent switchpoints (#3845)dan2024-05-031-36/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | [Clipclops] Moar error (#3837)Eric Bailey2024-05-031-34/+75
| | | | | | | | | | | | | | * Add history error * Log error * Add period
* | [Session] Reset global agent on expire (#3838)dan2024-05-031-6/+11
| |
* | [Session] Rely on agent session change event for persisting resumed session ↵dan2024-05-031-32/+12
| | | | | | | | | | | | | | (#3836) * Rely on agent session change handler for resumption * Add a fast path for noop resumes
* | [Clipclops] External store, suspend/resume (#3829)Eric Bailey2024-05-023-146/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | * Initial working external store * Clean up WIP, explore suspend/resume * Clean up state, bindings, snapshots, add some logs * Reduce snapshots, add better logic check * Bump interval a smidge * Remove unused type
* | [Session] Fix stale emailAuthFactor and emailConfirmed on the client (#3835)dan2024-05-031-15/+11
| | | | | | | | | | * Fix account refresh to not clobber falsy values * Use ?? in more places
* | [Session] Track agent in state (#3833)dan2024-05-031-47/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | * Expand currentAccountDid into currentAgentState * Inline all callsites of upsertAccount * Inline all internal callsites of clearCurrentAccount * Add agent to currentAgentState * Collapse extra setStates * Add TODOs
* | [Session] Call persist handler directly (#3828)dan2024-05-021-96/+63
| |
* | [Clipclops] Deletions (#3824)Eric Bailey2024-05-021-23/+57
| | | | | | | | | | * Handle message deletions * Handle failures
* | [Session] Extract selectAccount out (#3812)dan2024-05-022-29/+1
| |
* | [Session] Extract resumeSession out (#3811)dan2024-05-022-24/+1
| |
* | [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>