Check m_accountsLoading and m_connectionsLoading separately for removal as when loadAccessTokenFromKeyChain() fails m_connectionsLoading won't have an entry for it
(cherry picked from commit 57e7004e05)
9aadd773 Check m_accountsLoading and m_connectionsLoading separately for removal as...
Co-authored-by: James Graham <james.h.graham@protonmail.com>
We need a check here, because stickers (and really, any images without a
tempSource) will try to access an undefined object.
This fixes the error:
"qrc:/qt/qml/org/kde/neochat/timeline/ImageComponent.qml:106: TypeError: Cannot read property 'source' of undefined"
(cherry picked from commit 2a8cd74ab1)
If we do not set the width/height for stickers (which don't have any)
then the height is okay, but the message has the maximum width which
looks odd.
Instead, let's limit all stickers to 256px and it makes them look much
nicer in chat.
(cherry picked from commit 63bc7055c2)
Every time I look at how resource resolving works, I always trip over
this unused overload. This behaves *different* than the other overload,
which has special cases for handling invalid Uris.
Now whether you pass in a Uri or a QString, it should behave the same.
(cherry picked from commit 55362c5573)
Currently custom emojis render weirdly in NeoChat. Not only are they
large, they're also in charge and like to mess up the layout of the
text.
Now that's fixed and they'll take up the same height as the surrounding
text. It's now centered in the text too.
(cherry picked from commit 0bba2299b3)
This was supposed to work, but it's done in the wrong order. We need to
set the current space first, and then select the room - otherwise
it doesn't get restored.
(cherry picked from commit 6c416a9338)
This is only really needed in specific cases, e.g. localUser which isn't
attached to a connection and thus needs a little help. Notes for when
this is needed is added for future readers.
(cherry picked from commit ef953b7574)
The problem lies in how media URLs work, in this case it the old
NeoChatRoom::avatarMediaId could pass a mxc url *or* a path that can
be put into root.connection.makeMediaUrl. So normal rooms with avatars
loaded, but never friends because room members gave the mxc URL.
Instead, change everything to use avatarMediaUrl which corrects this
issue by always passing a mxc URL to QML. This also removes the need to
call makeMediaUrl.
Fixes#675
(cherry picked from commit 6b79795229)
Apparently, we are supposed to be setting source file properties for our QML files *before*
the QML module is created. Doing it after seemed to work until Qt 6.8, where it finally
broke. Notably, this makes the Android version work again but might also affect Windows.
(cherry picked from commit a39194b2ad)
Co-authored-by: Joshua Goins <josh@redstrate.com>
This still keeps custom image descriptions, but no longer shows it for
images where it was the same as their filename.
(cherry picked from commit 437c981d30)
This standardizes on the same value used for KirigamiAddons pages like AboutKDE and About, namely largeSpacing * 4.
Now, when switching between settings pages you no longer have settings inconsistently changing heights willy nilly, header notwithstanding.
The only page that's missing is the Spellchecking page, as that needs to be fixed in Kirigami Addons' private Sonnet page.
(cherry picked from commit 396cc8e8ef)
This is easy to test if you have no stickers. It should no longer have
a weird empty space above the placeholder message.
(cherry picked from commit a909ed498f)
First, the fill mode for the sticker images shouldn't stretch them.
Also make sure there is enough padding in the category so the image
doesn't appear larger than the button. Finally, set the source size for
the images so Qt can smooth them out better.
(cherry picked from commit 16f4e17e8f)
According to the HIG, we should be using symbolic versions of these
icons at this size. Not that we have symbolic versions for these icons
yet, but it's still safe to do as they'll fall back to the old ones.
(cherry picked from commit 5b9afbce9a)
If you try to click on your current room in the list, it scrolls up the
messages a bit. This is because in RoomManager::visitRoom it's being
called with an empty eventId and we will happily emit a goToEvent. This
is despite there being nothing to go to.
Fixes#677.
(cherry picked from commit 2379e3d83b)
This was never ported from the Qt labs platform FileDialog, because
currentFile doesn't exist anymore. It's now called selectedFile.
(cherry picked from commit 31ef0a5223)
Before it only listed the user id, and nothing else. If you had multiple
accounts, it's a little difficult to tell them apart. Now the user
selection appears like how they are displayed elsewhere in NeoChat, with
the display name and avatar.
| Before | After |
| ------ | ------ |
| {width=786 height=822} | {width=786 height=822} |
(cherry picked from commit 14c58acea1)
Otherwise it may be undefined, and we DO create default-constructed
PollHandler. For example, one is used as a fallback poll object
in NeoChatRoom::poll.
This is blind fix for a pretty nasty poll-related crash we saw a few
months ago.
BUG: 493649
(cherry picked from commit 5ef66b5cf6)
I have a room with a custom type that's only for holding data, and
doesn't need to be shown in the room list. Currently the spec is a bit
vague about what clients should do, but hiding them is probably fine
for now.
(cherry picked from commit bb9ce117de)
If you spam click the "Close link preview" button, it's possible to
crash NeoChat. This is because the index check is wrong for the array
size.
It's possible to even do this due to a bug causing the removal to be
reflected visually too slowly, that's fixed in the next commit.
(cherry picked from commit 253f891c5a)
First of all, clicking on them actually works - because we were missing
an import for RoomManager. Secondly, we use a dedicated TapHandler
since onLinkActivated sucks. We want to be able to click anywhere on the
preview to go to the website/room anyway.
(cherry picked from commit 6966159062)