Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Conversation

@lukebarnard1
Copy link
Contributor

  • Create a promise that will serve as a lock to be blocked on by things that need to wait for the first sync before accessing state.
  • Use this promise to block view_room calls until a sync has occured instead of just dropping them silently if the sync hasn't happened yet.
  • Store the current room ID in a localStorage item mx_last_room_id when view_room fires. This persists the last viewed room ID so that it can be restored on refresh, browser quit. This replaces the previous logic which set the room following a sync based on the most recent unread room.

Fixes element-hq/element-web#3559

Luke Barnard added 2 commits April 6, 2017 11:38
- Create a promise that will serve as a lock to be blocked on by things that need to wait for the first sync before accessing state. - Use this promise to block `view_room` calls until a sync has occured instead of just dropping them silently if the sync hasn't happened yet. - Store the current room ID in a localStorage item `mx_last_room_id` when `view_room` fires. This persists the last viewed room ID so that it can be restored on refresh, browser quit. This replaces the previous logic which set the room following a sync based on the most recent unread room.
@dbkr dbkr assigned lukebarnard1 and unassigned dbkr Apr 6, 2017
@lukebarnard1 lukebarnard1 merged commit 755ea96 into develop Apr 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants