about summary refs log tree commit diff
path: root/src/state/session/types.ts
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2025-07-23 19:52:38 +0300
committerGitHub <noreply@github.com>2025-07-23 11:52:38 -0500
commit8fdcc3ee31aefae91ce5552c3aa74bfb867893ac (patch)
treed9cdf9186300f7e25c04cb9161be25744fb16850 /src/state/session/types.ts
parentb4938bc9df3cc9bd2588ab0e34fd8cfda095c797 (diff)
downloadvoidsky-8fdcc3ee31aefae91ce5552c3aa74bfb867893ac.tar.zst
Replace `resumeSession` with `getSession` in the email check (#8670)
* replace resumeSession with getSession

* copy lil type tweak from the other PR

* Add partialRefreshSession to session API context, use session state to infer state further down tree

* Review

---------

Co-authored-by: Eric Bailey <git@esb.lol>
Diffstat (limited to 'src/state/session/types.ts')
-rw-r--r--src/state/session/types.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/state/session/types.ts b/src/state/session/types.ts
index aa8b9a99e..4621b4f04 100644
--- a/src/state/session/types.ts
+++ b/src/state/session/types.ts
@@ -40,4 +40,12 @@ export type SessionApiContext = {
   ) => void
   resumeSession: (account: SessionAccount) => Promise<void>
   removeAccount: (account: SessionAccount) => void
+  /**
+   * Calls `getSession` and updates select fields on the current account and
+   * `BskyAgent`. This is an alternative to `resumeSession`, which updates
+   * current account/agent using the `persistSessionHandler`, but is more load
+   * bearing. This patches in updates without causing any side effects via
+   * `persistSessionHandler`.
+   */
+  partialRefreshSession: () => Promise<void>
 }