Avoid openning a conversation on sip url and copy the URL into the smartsearchbar.

This commit is contained in:
Julien Wadel 2022-07-01 17:41:10 +02:00
parent 372697edc9
commit 7c45eccf86
3 changed files with 3 additions and 8 deletions

View file

@ -28,6 +28,7 @@
UrlHandlers::UrlHandlers (QObject *parent) : QObject(parent) {
QDesktopServices::setUrlHandler("sip", this, "handleSip");
QDesktopServices::setUrlHandler("sips", this, "handleSip");
}
void UrlHandlers::handleSip (const QUrl &url) {

View file

@ -78,7 +78,6 @@ Rectangle {
Layout.fillWidth: true
Layout.fillHeight: true
property var previewDefinition: SettingsModel.getCurrentPreviewVideoDefinition()
onPreviewDefinitionChanged: console.log(Utils.printObject(previewDefinition))
property real cameraRatio: previewDefinition.height > 0 ? previewDefinition.width/previewDefinition.height : 1.0
property int minSize: Math.min( loader.height, loader.width)
property int cameraHeight: Math.min(Math.min(cameraRatio * minSize, loader.width) / cameraRatio, minSize)

View file

@ -400,12 +400,7 @@ ApplicationWindow {
target: UrlHandlers
onSip: {
window.setView('Conversation', {
peerAddress: sipAddress,
localAddress: AccountSettingsModel.sipAddress,
fullPeerAddress: sipAddress,
fullLocalAddress: AccountSettingsModel.fullSipAddress
})
}
mainSearchBar.text = sipAddress
}
}
}