In summary this makes RoomTiles (and RoomAvatars) do more for
themselves in terms of reacting individually to state changes in
the js-sdk.
Instead of force updating the entire room list for avatar changes
and room name changes, do this in the RoomTile and RoomAvatar
instead. This increases the number of listeners listening to the
matrix client, but allows us to properly implement a
shouldComponentUpdate for RoomTile (because the avatar, name and
notification count are now in component state)
* Allow the client to run without connection to HS (i.e. using indexeddb)
Allows running without having pushRules (it's safe not to have these
when running from indexeddb sync.)
This means rooms will be displayed with "unknown" notifcation state.
This assumes anything that uses the push rules will get pushRule state
again when the client starts syncing again.
For recovering from being disconnected,
* If an avatar has fallen back, try again on reconnection
* If a thumbnail image failed to load, retry on reconnect
* Load joined groups when reconnecting
Update tests to give MELS a context.matrixClient
The feature is incredibly buggy and doesn't work as expected due to server behaviour and client interaction. One of the major problems is the constantly confused presence state - this is caused by the mobile apps conflicting on the state of the web app, causing it to consider the user offline or online (and rarely away) depending on how riot-android/ios is behaving at the time.
This reverts two PRs:
* https://github.com/matrix-org/matrix-react-sdk/pull/1620
* https://github.com/matrix-org/matrix-react-sdk/pull/1482
The changes to the context menu positioning were not reverted as they are useful outside of presence management.
Signed-off-by: Travis Ralston <travpc@gmail.com>
Includes rudimentary support for custom statuses and user-controlled status. Some minor tweaks have also been made to better control how we advertise our presence.
Signed-off-by: Travis Ralston <travpc@gmail.com>
- GroupView can now render with rooms in the summary that do not have an avatar
- RoomAvatar no longer has a redundant fallback avatar (this is handled by BaseAvatar)
- RoomAvatar was delinted
This is a URL that can be used to start a chat with a user.
- If the user is a guest, setMxId dialog will appear before anything and a defered action will cause `ChatCreateOrReuseDialog` to appear once they've logged in.
- If the user is registered, they will not see the setMxId dialog.
fixes https://github.com/vector-im/riot-web/issues/4034
BaseAvatar can be passed an onClick which is called when it's, er,
clicked, except when it was the default avatar in which case it
merrily ignored it. Make it not ignore it.
The correct 1-1 avatar is used with rooms in which there are only two users with either "join" or "invite" as their membership (importantly, not "leave" or otherwise).
(This is important when a user moves accounts and re-joins previously left 1-1 chats)
* Fix join/part collapsing regressions
* Simplify loop
* Explain e,e
* Explain return null in _renderSummary
* Kill it properly
* Move . to _renderSummary
* Only use the first and last events to decide whether a net change has occured
* Do not sort events by TS before summarising
* fix loop and comment
* remove data-number-events
* Better explanation comment in _renderSummary
* Less tortuous comment
React apparently now checks the properties which are set on DOM elements, and
grumbles noisily about unexpected ones. Update BaseAvatar and RoomAvatar so
that they don't set unrelated properties on the DOM elements.
I've been trying to get some tests working under PhantomJS, which appears not
to support String.codePointAt (which is, to be fair, an ES6 addition). For our
limited usecase, it's easier to implement the functionality from first
principles than to try to polyfill support.
Object.keys() is O(n) and is wasted because we only care if the keys are 1 or 2.
Use `for .. in` instead and return early if there are >2 keys.
Profiling indicates this cuts wasted time from ~74ms to ~32ms for me (who has
a large number of rooms with large numbers of people in them).