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

Remove DM-guessing code #829

Merged
merged 1 commit into from
May 4, 2017

Conversation

lukebarnard1
Copy link
Contributor

@lukebarnard1 lukebarnard1 commented Apr 24, 2017

Should fix element-hq/element-web#3331

@dbkr and I decided that it would be easiest to just not be setting the DM state when rendering. I couldn't find any code path or theorise any accurate state of the app that could lead to a rendering of the RoomList being done before AccountData had been received.

@dbkr
Copy link
Member

dbkr commented Apr 24, 2017

lgtm code-wise. @ara4n @lampholder is this OK by you? We figure this code is now not giving anyone any benefit since nobody will be upgrading from old versions anymore, and it will prevent the disappearing people section bug from being a problem.

@dbkr dbkr assigned ara4n and lampholder and unassigned dbkr Apr 24, 2017
@ara4n
Copy link
Member

ara4n commented Apr 24, 2017

i thought we were going to fix this by having getAccountData() distinguish between "empty" and "not yet known"? I can see the upgrading behaviour being quite useful for people migrating to Riot from other matrix clients, etc...

@lukebarnard1
Copy link
Contributor Author

lukebarnard1 commented Apr 25, 2017

@ara4n there were a few complications with this, namely that having traced through the state that the client has to be in for the RoomList to appear, the client has done a sync by that point. So neither @dbkr nor I can figure out why it would ever appear without the true account data being cached. That is unless the server did a weird thing and sent account data in a later sync (breaking the assumption that first sync = accurate representation of server state).

Also, in trying to add sync state checks to the relevant places to prevent getAccountData() from being called without a sync having been done, I found that the only reason it would be called would be a js-sdk event being fired, causing one of the views' onAccountData to be triggered. The only reason for this firing is if the sync response is being processed, in which case there's no point in checking.

@lukebarnard1
Copy link
Contributor Author

As suggested by @ara4n, it would be a Good Idea to have a "Guess DMs" button in settings so that users moving over from a client that doesn't deal with DMs or users that have previously lost their DM maps can reset them.

@lukebarnard1
Copy link
Contributor Author

I'm going to merge this to avoid more DM sections going missing and make a new issue to track the "Guess DMs" button

@lukebarnard1 lukebarnard1 reopened this May 4, 2017
@lukebarnard1 lukebarnard1 merged commit d5b49a1 into develop May 4, 2017
lukebarnard1 pushed a commit that referenced this pull request Jun 5, 2017
Seems this got reverted somehow:
>the revert of #807 (ebfafb3) also included the revert of #829
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

People section disappeared
4 participants