message: Simplify dispatch blocks
diff: @@ -179,21 +179,10 @@ class RoomViewStore extends Store {
  } else if (payload.room_alias) {
  // Try the room alias to room ID navigation cache first to avoid
  // blocking room navigation on the homeserver.
  - const roomId = getCachedRoomIDForAlias(payload.room_alias);
  - if (roomId) {
  - dis.dispatch({
  - action: 'view_room',
  - room_id: roomId,
  - event_id: payload.event_id,
  - highlighted: payload.highlighted,
  - room_alias: payload.room_alias,
  - auto_join: payload.auto_join,
  - oob_data: payload.oob_data,
  - });
  - return;
  - }
  - // Room alias cache miss, so let's ask the homeserver.
  - // Resolve the alias and then do a second dispatch with the room ID acquired
  + let roomId = getCachedRoomIDForAlias(payload.room_alias);
  + if (!roomId) {
  + // Room alias cache miss, so let's ask the homeserver. Resolve the alias
  + // and then do a second dispatch with the room ID acquired.
  this._setState({
  roomId: null,
  initialEventId: null,
  @@ -206,15 +195,7 @@ class RoomViewStore extends Store {
  try {
  const result = await MatrixClientPeg.get().getRoomIdForAlias(payload.room_alias);
  storeRoomAliasInCache(payload.room_alias, result.room_id);
  - dis.dispatch({
  - action: 'view_room',
  - room_id: result.room_id,
  - event_id: payload.event_id,
  - highlighted: payload.highlighted,
  - room_alias: payload.room_alias,
  - auto_join: payload.auto_join,
  - oob_data: payload.oob_data,
  - });
  + roomId = result.room_id;
  } catch (err) {
  dis.dispatch({
  action: 'view_room_error',
  @@ -222,8 +203,20 @@ class RoomViewStore extends Store {
  room_alias: payload.room_alias,
  err,
  });
  + return;
  }
  }
  +
  + dis.dispatch({
  + action: 'view_room',
  + room_id: roomId,
  + event_id: payload.event_id,
  + highlighted: payload.highlighted,
  + room_alias: payload.room_alias,
  + auto_join: payload.auto_join,
  + oob_data: payload.oob_data,
  + });
  + }
  }
  _viewRoomError(payload) {
  