Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐴] Make status checks easier, fix load state #4010

Merged
merged 4 commits into from
May 14, 2024

Conversation

estrattonbailey
Copy link
Member

@estrattonbailey estrattonbailey commented May 14, 2024

One of the goals of the Convo agent is to help prevent invalid states and invalid prop access. This PR adds a couple utils to help with this:

  • isConvoActive — checks if the Convo is in an active status
  • useConvoActive — provides assurance that isConvoActive(convo) is true

This helps when creating UI, so that we don't always need to check Convo.status, and with load states for the same reason.

See below where the convo no longer re-initializes when backgrounded.

RocketSim_Recording_iPhone_15_6.1_2024-05-14_11.03.31.mp4

Copy link

render bot commented May 14, 2024

Copy link

github-actions bot commented May 14, 2024

Old size New size Diff
6.83 MB 6.83 MB -28 B (-0.00%)

@estrattonbailey estrattonbailey merged commit 1c51a48 into main May 14, 2024
6 checks passed
estrattonbailey added a commit that referenced this pull request May 14, 2024
* origin/main:
  [🐴] Make status checks easier, fix load state (#4010)
  [🐴] Chat muted state (#3988)
  [🐴] Swap in new package, update usages (#3992)
  Add better onboard testing (#4007)
  add a `Login` notifications request (#4006)
  align the trash icon in the center in feed edit list (#4004)
  Make feeds easier to reorder (#3998)
  [Reduced Onboarding] Fix forward/backward nav with profile step (#3997)
  Gate base following feed usage (#3994)
estrattonbailey added a commit that referenced this pull request May 15, 2024
* origin/main: (48 commits)
  [🐴] Show if user can be messaged in new chat search (#4021)
  Make more localizable (#3962)
  [🐴] change `Follows Only` to `People I Follow` (#4028)
  Reset after 5 min (#4026)
  [🐴] Block states, read only (#4022)
  [🐴]Add DM push notification sound (#4000)
  remove serviceurl gate (#4019)
  reword subtitle (#4017)
  [🐴] show deleted account for `missing.invalid` (#4014)
  [🐴] use "Chats" instead of "Messages" (#4013)
  100vh settings screen (#4015)
  Run intl extract (#4016)
  [🐴] Settings screen (#3830)
  [🐴] Message drafts (#3993)
  Update Korean localization (#3887)
  Update catalan messages.po (#3984)
  Fix dep (#4011)
  [🐴] Make status checks easier, fix load state (#4010)
  [🐴] Chat muted state (#3988)
  [🐴] Swap in new package, update usages (#3992)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants