have seen errors in this direction, so hope this will fix it,
as this is invoked from any EventTile's onHeightChanged callback,
which is often called after some async operation (by when the
timeline can be unmounted already).
doesn't hurt in any case.
This was using a separate function (in MatrixChat) that didn't
take into account whether we were supposed to be hiding the badge
for rooms so would include notifs that were hidden everywhere else.
Also make it a function & put it in RoomNotifs with all its friends.
Fixes https://github.com/vector-im/riot-web/issues/3060
My brain can't deal with two different ways to write "Tooltip", so this
converges the naming to match the rest of the code base. Separate commits will
fix up the file names for case-insensitive file systems.
On registering, we showed a spinner, and then another spinner on
top of the spinner, which led to an interesting spinner-in-box
effect.
Suppress the second type of spinner when we know we already have one.
https://github.com/matrix-org/matrix-react-sdk/pull/3101 meant we
don't get logged straight in after registering if using an email
address, but this was the point at which we made a chat with the
welcome user. Instead, set a flag in memory that we should try &
make a chat with the welcome user for that user ID if we get a
session for them.
Of course, if the user logs in on both tabs, this would mean each
would make a chat with the welcome user (although actually this
was a problem with the old code too). Check our m.direct to see if
we've started a chat with the welcome user before making one (which
also means we have to make sure the cached sync is up to date...
see comments).
You now don't get automatically logged in after finishing
registration. This makes a whole class of failures involving race
conditions and multiple devices impossible.
https://github.com/vector-im/riot-web/issues/9586
This always clear the login busy state after .well-known discovery without
waiting for the resulting server config. This is important for the case where
the HS that a full MXID resolves to matches the default HS, as without it we'd
be stuck in a busy state forever.
Fixes https://github.com/vector-im/riot-web/issues/10014
For context menus without chevrons, this changes the menu components to still
set default styles that align the menu based on the edges used to specify the
menu's position. This is not intended to change the positioning of any existing
menus.
When the user was on an invite page and clicked the sign up/sign in
buttons, remember that invite so we can show it again after they're
done signing up/in.
https://github.com/vector-im/riot-web/issues/9816
Riot was always saying the email address that the invite was sent
to was not associated with your account.
Two fixes here:
1. We mounted RoomPreviewBar with no invitedEmail prop and then
changed the prop later, but RoomPreviewBar only checked for it
on mount. Make sure we re-check when the props change.
2. Pass oobData through RoomPreviewBar because we need to pass it
to the RoomAvatar for 3pid invites.
https://github.com/vector-im/riot-web/issues/9816
This performs liveliness checks on the auth pages to try and show a friendlier error. Earlier checks in the app startup are expected to not block the app from loading on such failures.
See https://github.com/vector-im/riot-web/issues/9828
See https://github.com/vector-im/riot-web/pull/9957
The two hacks introduced here are for different reasons, mostly related to the welcome page. If you land directly on the welcome page, the app's lifecycle is highly unlikely to have a bootstrapped client. This results in the loggedIn class being false. When the client is later set up (loaded from session, new guest account registered, etc) the context fails to update for the EmbeddedPage, and we need to give it a kick to re-render. It's arguable if we should even keep using the context here.
This changes read receipt sending logic to allow it advance further into events
without tiles (such as edits or reactions) that may exist after the last
displayed event.
By allowing the read receipt to advance past such events, this also marks as
read any related notifications. For example, edits trigger notifications by
default since they are `m.room.message` events, and with this change, such edit
notifications can finally be marked read.
Part of https://github.com/vector-im/riot-web/issues/9745
This adds additional receipt storage to so that we can handle cases where the
receipts and events lists get out of sync. If we ever find a user who previously
had a receipt but momentarily no longer does, we recover their previous receipt
and go with that until we hear something new.
Part of https://github.com/vector-im/riot-web/issues/9745
This changes how we determine read receipts for the entire message panel. We now
calculate read receipts for all events up front, which makes it easier to handle
hidden events by moving their read receipts up to the last shown event for
display purposes.
Part of https://github.com/vector-im/riot-web/issues/9745
Smooth scrolling browsers (Firefox) use the relative area to determine how much scroll to apply. Because breadcrumbs are short vertically, the scroll amount is minimal (3 units) in the Y direction. On browsers which don't smooth scroll the units are usually much higher (100 in Chrome on Win 10). Users seem to expect the scrolling to be quicker due to the horizontal space on breadcrumbs, so we add a bit more power to their scroll when it looks small.
Fixes https://github.com/vector-im/riot-web/issues/9394
We previously sent it in componentWillMount of the email token
auth component which definitely gets us on react's naughtly list.
We now pass the js-sdk a callback it can call at the appropriate
time to send the token (https://github.com/matrix-org/matrix-js-sdk/pull/926).
We should make password reset and adding email addresses work the
same way, but currently they don't even use the interactive-auth
helpers(!) so they're unaffected.
https://github.com/vector-im/riot-web/issues/9586
Timeline sets may have a null room, such as with the notification timeline set.
Here we check that case when events are decrypted to avoid throw an error.
Fixes https://github.com/vector-im/riot-web/issues/9798
This fixes an error that crashed that notifications panel because it was trying
to read reactions, even though we currently don't aggregate them there. This
change is more explicit about exactly which views should try to show reactions.
Fixes https://github.com/vector-im/riot-web/issues/9713
This is often null while the component is on its first render, and is called during that render. It is eventually populated by React, and the function re-called - we just have to be patient.
If you were in the username field and simply tabbed out without entering anything, the form would become "busy" and not let you submit. We should only be doing this if we have work to do, like .well-known discovery of the homeserver.
Regressed in https://github.com/matrix-org/matrix-react-sdk/pull/2768
where we check for an existing stored account first and restore that
instead if it exist, telling the user. We usually make a guest account
when the user first hits the page though, so this just restored this
guest account.
Don't restore the account if it's just a guest account (which, as per
comment, is not perfect, but is definitely better than the current
behaviour).
Fixes https://github.com/vector-im/riot-web/issues/9581
We look to see if there's already a user logged in and if there is,
restore that session instead of logging the user in as their new
account. We still set this 'is_registered' flag though, even though
in that case it's not a newly registered account that's being restored,
so don't set in that case.