diff --git a/packages/frontend/src/ScreenController.tsx b/packages/frontend/src/ScreenController.tsx index 0e44164a2d..87c9f6d000 100644 --- a/packages/frontend/src/ScreenController.tsx +++ b/packages/frontend/src/ScreenController.tsx @@ -138,13 +138,15 @@ export default class ScreenController extends Component { if (!dontStartIo) { await BackendRemote.rpc.startIo(accountId) } - runtime.setDesktopSetting('lastAccount', accountId) - BackendRemote.rpc.getSystemInfo().then(info => { - log.info('system_info', info) - }) - BackendRemote.rpc.getInfo(accountId).then(info => { - log.info('account_info', info) - }) + return Promise.all([ + runtime.setDesktopSetting('lastAccount', accountId), + BackendRemote.rpc.getSystemInfo().then(info => { + log.info('system_info', info) + }), + BackendRemote.rpc.getInfo(accountId).then(info => { + log.info('account_info', info) + }), + ]) } async unSelectAccount() { diff --git a/packages/frontend/src/components/AccountListSidebar/AccountItem.tsx b/packages/frontend/src/components/AccountListSidebar/AccountItem.tsx index b9578c1094..53cb6274b9 100644 --- a/packages/frontend/src/components/AccountListSidebar/AccountItem.tsx +++ b/packages/frontend/src/components/AccountListSidebar/AccountItem.tsx @@ -99,7 +99,9 @@ export default function AccountItem({ // set Timeout forces it to be run after react update setTimeout(() => { ActionEmitter.emitAction(KeybindAction.GlobalGallery_Open) - }, 0) + // NOTE(maxph): Gallery.tsx gets unmounted before receiving media data + // and breaks markdown, so here 50ms is a temprorary workaround for that + }, 50) }, }, {