Fix-up QR code scanning actions
I cleaned up how resolving QR codes work, I made sure to test both user and room links and everything works great. A more awkward bug I fixed is a workaround around a quirk in Kirigami.Dialog, but actually regresses QR codes. Because the QR code scanner is currently an extra window (at least on desktop) the UserDetailDialog will reparent itself to the soon-to-be-destroyed scanner window.
This commit is contained in:
@@ -209,9 +209,16 @@ void RoomManager::resolveResource(Uri uri, const QString &action)
|
||||
return;
|
||||
}
|
||||
|
||||
if (uri.type() == Uri::NonMatrix && action == "qr"_L1) {
|
||||
Q_EMIT externalUrl(uri.toUrl());
|
||||
return;
|
||||
if (action == "qr"_L1) {
|
||||
if (uri.type() == Uri::NonMatrix) {
|
||||
Q_EMIT externalUrl(uri.toUrl());
|
||||
return;
|
||||
}
|
||||
if (uri.type() != Uri::UserId) {
|
||||
uri.setAction(QStringLiteral("join"));
|
||||
} else {
|
||||
uri.setAction(action);
|
||||
}
|
||||
}
|
||||
|
||||
// For matrix URIs:
|
||||
|
||||
Reference in New Issue
Block a user