Fix wrong API call when adding new account

This commit is contained in:
Lim Chee Aun 2023-04-16 13:52:16 +08:00
parent 903944e9c2
commit 39ec0d29e2
2 changed files with 4 additions and 1 deletions

View file

@ -249,7 +249,8 @@ function App() {
<Route path="/:instance?/s/:id" element={<Status />} />
</Routes>
<div>
{!snapStates.settings.shortcutsColumnsMode &&
{isLoggedIn &&
!snapStates.settings.shortcutsColumnsMode &&
snapStates.settings.shortcutsViewMode !== 'multi-column' && (
<Shortcuts />
)}

View file

@ -93,6 +93,8 @@ export async function initAccount(client, instance, accessToken) {
const masto = client;
const mastoAccount = await masto.v1.accounts.verifyCredentials();
store.session.set('currentAccount', mastoAccount.id);
saveAccount({
info: mastoAccount,
instanceURL: instance.toLowerCase(),