Skip to content

Commit

Permalink
Make login the default screen
Browse files Browse the repository at this point in the history
  • Loading branch information
psrpinto committed Nov 30, 2023
1 parent e0f52ce commit 799235f
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions frontend/iframe/viewmodels/RootViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,20 +196,12 @@ export class RootViewModel extends ViewModel<SegmentType, Options> {
// We were not able to restore the last URL.
// So we send the user to the screen that makes the most sense, according to how many sessions they have.

// Go to Login when there are no sessions.
if (sessionInfos.length === 0) {
this.navigation.push(Section.Login);
return;
}

// Open session.
if (sessionInfos.length === 1) {
this.navigation.push(Section.Session, sessionInfos[0].id);
return;
}

// Open session picker.
this.navigation.push(Section.Session);
this.navigation.push(Section.Login);
}

private async resolveRoomAlias(roomIdOrAlias: string): Promise<string> {
Expand Down

0 comments on commit 799235f

Please sign in to comment.