Skip to content

Commit f7fa2f0

Browse files
committed
dont override sending to the correct url and move our code to run only when no session exists
1 parent a1e8b6c commit f7fa2f0

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

frontend/iframe/viewmodels/RootViewModel.ts

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -165,27 +165,25 @@ export class RootViewModel extends ViewModel<SegmentType, Options> {
165165
this._showLogin(loginToken);
166166
}
167167
} else {
168-
if (this._singleRoomIdOrAlias) {
169-
// No active session but we're in single-room mode.
170-
if (!this._resolvedSingleRoomId) {
171-
try {
172-
this._resolvedSingleRoomId = await this.resolveRoomAlias(this._singleRoomIdOrAlias);
173-
} catch (error) {
174-
console.warn(error);
175-
}
176-
}
177-
178-
if (this._resolvedSingleRoomId) {
179-
await this._showUnknownRoom(this._resolvedSingleRoomId);
180-
return;
181-
}
182-
}
183-
184168
try {
185169
if (!(shouldRestoreLastUrl && this.urlRouter.tryRestoreLastUrl())) {
186170
const sessionInfos = await this.platform.sessionInfoStorage.getAll();
187171
if (sessionInfos.length === 0) {
188-
this.navigation.push(Section.Login);
172+
if (!this._singleRoomIdOrAlias) {
173+
this.navigation.push(Section.Login);
174+
}
175+
// No active session but we're in single-room mode.
176+
if (!this._resolvedSingleRoomId) {
177+
try {
178+
this._resolvedSingleRoomId = await this.resolveRoomAlias(this._singleRoomIdOrAlias);
179+
} catch (error) {
180+
console.warn(error);
181+
}
182+
}
183+
184+
if (this._resolvedSingleRoomId) {
185+
await this._showUnknownRoom(this._resolvedSingleRoomId);
186+
}
189187
} else if (sessionInfos.length === 1) {
190188
this.navigation.push(Section.Session, sessionInfos[0].id);
191189
} else {

0 commit comments

Comments
 (0)