fix: workspace names now default to account email after signing in. It can later be changed from the workspace switcher menu.

This commit is contained in:
Mo
2023-05-04 05:52:42 -05:00
parent d9c480b67b
commit 8385b4e89f
184 changed files with 215 additions and 205 deletions

View File

@@ -8,6 +8,7 @@ import {
InternalEventBus,
InternalEventBusInterface,
RawStorageKey,
ApplicationEvent,
} from '@standardnotes/services'
import { UuidGenerator } from '@standardnotes/utils'
import { AppGroupCallback } from './AppGroupCallback'
@@ -72,6 +73,13 @@ export class SNApplicationGroup<D extends DeviceInterface = DeviceInterface> ext
this.primaryApplication = application
application.addEventObserver(async () => {
this.renameDescriptor(
primaryDescriptor as ApplicationDescriptor,
application.sessions.getWorkspaceDisplayIdentifier(),
)
}, ApplicationEvent.SignedIn)
await this.notifyEvent(ApplicationGroupEvent.PrimaryApplicationSet, { application: application })
}