Workaround open profiles from toot

Opening profiles (@user) in toots via function onLinkActivated shows user via search. This is a workaround - aim is to open profiles directly in profile.qml
This commit is contained in:
molan-git 2020-01-24 21:56:13 +01:00 committed by GitHub
parent d388de5f9f
commit c8545cca65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,10 +69,11 @@ Page {
onOpenDrawer: infoPanel.open = setDrawer
}
MyList{
id: tlPublic;
title: qsTr("Federated")
type: "timelines/public"
mdl: Logic.modelTLpublic
id: tlNotifications;
title: qsTr("Notifications")
type: "notifications"
notifier: true
mdl: Logic.modelTLnotifications
width: parent.itemWidth
height: parent.itemHeight
onOpenDrawer: infoPanel.open = setDrawer
@ -88,11 +89,10 @@ Page {
onOpenDrawer: infoPanel.open = setDrawer
}
MyList{
id: tlNotifications;
title: qsTr("Notifications")
type: "notifications"
notifier: true
mdl: Logic.modelTLnotifications
id: tlPublic;
title: qsTr("Federated")
type: "timelines/public"
mdl: Logic.modelTLpublic
width: parent.itemWidth
height: parent.itemHeight
onOpenDrawer: infoPanel.open = setDrawer
@ -260,6 +260,11 @@ Page {
slideshow.positionViewAtIndex(4, ListView.SnapToItem)
navigation.navigateTo('search')
} else if (test.length === 4 && test[3][0] === "@" ) {
tlSearch.search = decodeURIComponent("@"+test[3].substring(1)+"@"+test[2])
slideshow.positionViewAtIndex(4, ListView.SnapToItem)
navigation.navigateTo('search')
} else {
Qt.openUrlExternally(href);
}