Remove unused success state

This commit is contained in:
Travis Ralston 2020-08-19 19:23:27 -06:00
parent e0b8343088
commit 309c32700b

View file

@ -78,7 +78,7 @@ export function getEffectiveMembership(membership: string): EffectiveMembership
} }
} }
export async function leaveRoomBehaviour(roomId: string): Promise<boolean> { export async function leaveRoomBehaviour(roomId: string) {
let leavingAllVersions = true; let leavingAllVersions = true;
const history = await MatrixClientPeg.get().getRoomUpgradeHistory(roomId); const history = await MatrixClientPeg.get().getRoomUpgradeHistory(roomId);
if (history && history.length > 0) { if (history && history.length > 0) {
@ -120,7 +120,7 @@ export async function leaveRoomBehaviour(roomId: string): Promise<boolean> {
"so you cannot leave it.", "so you cannot leave it.",
), ),
}); });
return false; return;
} }
message = results[roomId].message; message = results[roomId].message;
} }
@ -130,11 +130,10 @@ export async function leaveRoomBehaviour(roomId: string): Promise<boolean> {
title: _t("Error leaving room"), title: _t("Error leaving room"),
description: messages, description: messages,
}); });
return false; return;
} }
if (RoomViewStore.getRoomId() === roomId) { if (RoomViewStore.getRoomId() === roomId) {
dis.dispatch({action: 'view_next_room'}); dis.dispatch({action: 'view_next_room'});
} }
return true;
} }