Merge pull request #11 from molan-git/develop

1.0.3-6
This commit is contained in:
molan-git 2020-01-30 13:22:54 +01:00 committed by GitHub
commit 26e309e327
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 705 additions and 617 deletions

View file

@ -36,7 +36,6 @@ import "./lib/API.js" as Logic
ApplicationWindow
{
id: appWindow
//initialPage: Component { FirstPage { } }
cover: Qt.resolvedUrl("cover/CoverPage.qml")
allowedOrientations: defaultAllowedOrientations
Component.onCompleted: {
@ -59,9 +58,6 @@ ApplicationWindow
pageStack.push(Qt.resolvedUrl("./pages/MainPage.qml"), {})
});
//
//
//pageStack.push(Qt.resolvedUrl("./pages/Conversation.qml"), {})
} else {
pageStack.push(Qt.resolvedUrl("./pages/LoginPage.qml"), {})
}

View file

@ -82,7 +82,7 @@ WorkerScript.onMessage = function(msg) {
console.log("descendants")
for (var j = 0; j < data[i].length; j ++) {
item = parseToot(data[i][j]);
item['id'] = item['status_id']
item['id'] = item['status_id'];
if (typeof item['attachments'] === "undefined")
item['attachments'] = [];
items.push(item)

View file

@ -6,32 +6,37 @@ import "./components/"
Page {
id: conversationPage
property string type;
property string type
property alias title: header.title
property alias description: header.description
property alias avatar: header.image
property string suggestedUser: ""
property ListModel suggestedModel;
property ListModel suggestedModel
property string toot_id: ""
property int tootMaxChar: 500;
property ListModel mdl;
property ListModel mdl
allowedOrientations: Orientation.All
onSuggestedUserChanged: {
console.log(suggestedUser)
suggestedModel = Qt.createQmlObject('import QtQuick 2.0; ListModel { }', Qt.application, 'InternalQmlObject');
predictionList.visible = false;
suggestedModel = Qt.createQmlObject(
'import QtQuick 2.0; ListModel { }',
Qt.application, 'InternalQmlObject'
)
predictionList.visible = false
if (suggestedUser.length > 0) {
var msg = {
'action' : 'accounts/search',
'method' : 'GET',
'model' : suggestedModel,
'mode' : "append",
'params' : [ {name: "q", data: suggestedUser} ],
'conf' : Logic.conf
};
worker.sendMessage(msg);
predictionList.visible = true;
"action": 'accounts/search',
"method": 'GET',
"model": suggestedModel,
"mode": "append",
"params": [{
"name": "q",
"data": suggestedUser
}],
"conf": Logic.conf
}
worker.sendMessage(msg)
predictionList.visible = true
}
}
@ -59,7 +64,7 @@ Page {
header: PageHeader {
title: qsTr("Conversation")
}
clip: true;
clip: true
anchors {
top: parent.top
bottom: panel.top
@ -74,7 +79,8 @@ Page {
text: Format.formatDate(section, Formatter.DateMedium)
}
}
delegate: VisualContainer {}
delegate: VisualContainer {
}
onCountChanged: {
if (mdl)
for (var i = 0; i < mdl.count; i++) {
@ -84,11 +90,10 @@ Page {
}
}
}
}
Rectangle {
id: predictionList
visible: false;
visible: false
anchors.bottom: panel.top
anchors.left: parent.left
anchors.right: panel.right
@ -102,14 +107,18 @@ Page {
delegate: ItemUser {
onClicked: {
var start = toot.cursorPosition;
var start = toot.cursorPosition
while (toot.text[start] !== "@" && start > 0) {
start--;
start--
}
textOperations.text = toot.text
textOperations.cursorPosition = toot.cursorPosition
textOperations.moveCursorSelection(start - 1, TextInput.SelectWords)
toot.text = textOperations.text.substring(0, textOperations.selectionStart) + ' @'+model.account_acct + ' ' + textOperations.text.substring(textOperations.selectionEnd).trim()
toot.text = textOperations.text.substring(0, textOperations.selectionStart)
+ ' @'
+ model.account_acct
+ ' '
+ textOperations.text.substring(textOperations.selectionEnd).trim()
toot.cursorPosition = toot.text.indexOf('@' + model.account_acct)
}
@ -130,7 +139,9 @@ Page {
}
width: parent.width
height: progressBar.height + toot.height + (mediaModel.count ? uploadedImages.height : 0) + btnContentWarning.height + Theme.paddingMedium + (warningContent.visible ? warningContent.height : 0)
height: progressBar.height + toot.height + (mediaModel.count ? uploadedImages.height : 0)
+ btnContentWarning.height + Theme.paddingMedium
+ (warningContent.visible ? warningContent.height : 0)
dock: Dock.Bottom
Rectangle {
width: parent.width
@ -145,7 +156,7 @@ Page {
}
Rectangle {
id: progressBar
width: toot.text.length ? panel.width*(toot.text.length/tootMaxChar) : 0;
width: toot.text.length ? panel.width * (toot.text.length / tootMaxChar) : 0
height: Theme.itemSizeSmall * 0.05
color: Theme.highlightBackgroundColor
@ -159,7 +170,7 @@ Page {
TextField {
id: warningContent
visible: false
height: visible ? implicitHeight : 0;
height: visible ? implicitHeight : 0
anchors {
top: parent.top
topMargin: Theme.paddingMedium
@ -168,7 +179,9 @@ Page {
}
autoScrollEnabled: true
labelVisible: false
placeholderText: qsTr("Content warning!")
placeholderText: qsTr("Write your warning here")
placeholderColor: palette.highlightColor
color: palette.highlightColor
horizontalAlignment: Text.AlignLeft
EnterKey.onClicked: {
//tweet()
@ -191,9 +204,13 @@ Page {
autoScrollEnabled: true
labelVisible: false
//focus: true
text: description !== "" && (description.charAt(0) == '@' || description.charAt(0) == '#') ? description+' ' : ''
height: implicitHeight
text: description !== "" && (description.charAt(0) == '@'
|| description.charAt(
0) == '#') ? description + ' ' : ''
height: Math.max(250, Math.min(900, implicitHeight))
//height: implicitHeight
horizontalAlignment: Text.AlignLeft
placeholderText: qsTrId("What's on your mind?")
EnterKey.onClicked: {
//tweet()
}
@ -201,12 +218,14 @@ Page {
textOperations.text = toot.text
textOperations.cursorPosition = toot.cursorPosition
textOperations.selectWord()
textOperations.select(textOperations.selectionStart ? textOperations.selectionStart-1 : 0, textOperations.selectionEnd)
textOperations.select(
textOperations.selectionStart ? textOperations.selectionStart - 1 : 0,
textOperations.selectionEnd)
//console.log(textOperations.text.substr(textOperations.selectionStart, textOperations.selectionEnd))
console.log(toot.text.length)
suggestedUser = ""
if (textOperations.selectedText.charAt(0) === "@") {
suggestedUser = textOperations.selectedText.trim().substring(1);
suggestedUser = textOperations.selectedText.trim().substring(1)
}
}
}
@ -218,18 +237,18 @@ Page {
}
anchors {
top: warningContent.bottom + 4
bottom: bottom.top
right: parent.right
rightMargin: Theme.paddingSmall
}
icon.source: "image://theme/icon-s-edit?" + (pressed
? Theme.highlightColor
: (warningContent.visible ? Theme.secondaryHighlightColor : Theme.primaryColor))
icon.source: "../../qml/images/emojiselect.svg" + (pressed ? Theme.highlightColor : (warningContent.visible ? Theme.secondaryHighlightColor : Theme.primaryColor))
onClicked: pageStack.push(firstWizardPage)
}
SilicaGridView {
id: uploadedImages
width: parent.width
anchors.top: bottom.toot
anchors.bottom: parent.bottom
height: mediaModel.count ? Theme.itemSizeSmall : 0
model: mediaModel
@ -239,7 +258,9 @@ Page {
id: myDelegate
width: uploadedImages.cellWidth
height: uploadedImages.cellHeight
RemorseItem { id: remorse }
RemorseItem {
id: remorse
}
Image {
anchors.fill: parent
fillMode: Image.PreserveAspectCrop
@ -250,18 +271,34 @@ Page {
var idx = index
console.log(idx)
//mediaModel.remove(idx)
remorse.execute(myDelegate, qsTr("Delete"), function() { mediaModel.remove(idx) } )
remorse.execute(myDelegate, qsTr("Delete"), function () {
mediaModel.remove(idx)
})
}
}
add: Transition {
NumberAnimation { property: "opacity"; from: 0; to: 1.0; duration: 800 }
NumberAnimation {
property: "opacity"
from: 0
to: 1.0
duration: 800
}
}
remove: Transition {
NumberAnimation { property: "opacity"; from: 1.0; to: 0; duration: 800 }
NumberAnimation {
property: "opacity"
from: 1.0
to: 0
duration: 800
}
}
displaced: Transition {
NumberAnimation { properties: "x,y"; duration: 800; easing.type: Easing.InOutBack }
NumberAnimation {
properties: "x,y"
duration: 800
easing.type: Easing.InOutBack
}
}
}
IconButton {
@ -272,9 +309,8 @@ Page {
left: parent.left
leftMargin: Theme.paddingMedium
}
icon.source: "image://theme/icon-s-warning?" + (pressed
? Theme.highlightColor
: (warningContent.visible ? Theme.secondaryHighlightColor : Theme.primaryColor))
icon.source: "image://theme/icon-s-warning?"
+ (pressed ? Theme.highlightColor : (warningContent.visible ? Theme.secondaryHighlightColor : Theme.primaryColor))
onClicked: warningContent.visible = !warningContent.visible
}
IconButton {
@ -285,21 +321,20 @@ Page {
left: btnContentWarning.right
leftMargin: Theme.paddingSmall
}
icon.source: "image://theme/icon-s-attach?" + (pressed
? Theme.highlightColor
: (warningContent.visible ? Theme.secondaryHighlightColor : Theme.primaryColor))
icon.source: "image://theme/icon-s-attach?"
+ (pressed ? Theme.highlightColor : (warningContent.visible ? Theme.secondaryHighlightColor : Theme.primaryColor))
onClicked: {
btnAddImage.enabled = false;
var once = true;
var imagePicker = pageStack.push("Sailfish.Pickers.ImagePickerPage", { "allowedOrientations" : Orientation.All });
btnAddImage.enabled = false
var once = true
var imagePicker = pageStack.push("Sailfish.Pickers.ImagePickerPage", {"allowedOrientations": Orientation.All})
imagePicker.selectedContentChanged.connect(function () {
var imagePath = imagePicker.selectedContent;
var imagePath = imagePicker.selectedContent
console.log(imagePath)
imageUploader.setUploadUrl(Logic.conf.instance + "/api/v1/media")
imageUploader.setFile(imagePath);
imageUploader.setAuthorizationHeader(Logic.conf.api_user_token);
imageUploader.upload();
});
imageUploader.setFile(imagePath)
imageUploader.setAuthorizationHeader(Logic.conf.api_user_token)
imageUploader.upload()
})
}
}
ImageUploader {
@ -312,68 +347,72 @@ Page {
onSuccess: {
uploadProgress.width = 0
console.log(replyData);
console.log(replyData)
mediaModel.append(JSON.parse(replyData))
}
onFailure: {
uploadProgress.width = 0
btnAddImage.enabled = true;
btnAddImage.enabled = true
console.log(status)
console.log(statusText)
}
}
ComboBox {
id: privacy
anchors {
top: toot.bottom
topMargin: -Theme.paddingSmall * 2
left: btnAddImage.right
right: btnSend.left
bottom: parent.bottom
}
menu: ContextMenu {
MenuItem { text: qsTr("public") }
MenuItem { text: qsTr("unlisted") }
MenuItem { text: qsTr("followers only") }
MenuItem { text: qsTr("direct") }
MenuItem {
text: qsTr("Public")
}
MenuItem {
text: qsTr("Unlisted")
}
MenuItem {
text: qsTr("Followers-only")
}
MenuItem {
text: qsTr("Direct")
}
}
}
IconButton {
id: btnSend
icon.source: "image://theme/icon-m-send?" + (pressed
? Theme.highlightColor
: Theme.primaryColor)
icon.source: "image://theme/icon-m-send?"
+ (pressed ? Theme.highlightColor : Theme.primaryColor)
anchors {
top: toot.bottom
right: parent.right
rightMargin: Theme.paddingLarge
rightMargin: Theme.paddingSmall
}
enabled: toot.text !== "" && toot.text.length < tootMaxChar
enabled: toot.text !== "" && toot.text.length < tootMaxChar && uploadProgress.width == 0
onClicked: {
var visibility = [ "public", "unlisted", "private", "direct"];
var media_ids = [];
var visibility = ["public", "unlisted", "private", "direct"]
var media_ids = []
for (var k = 0; k < mediaModel.count; k++) {
console.log(mediaModel.get(k).id)
media_ids.push(mediaModel.get(k).id)
}
var msg = {
'action' : 'statuses',
'method' : 'POST',
'model' : mdl,
'mode' : "append",
'params' : {
"action": 'statuses',
"method": 'POST',
"model": mdl,
"mode": "append",
"params": {
"status": toot.text,
"visibility": visibility[privacy.currentIndex],
"media_ids": media_ids
},
'conf' : Logic.conf
};
"conf": Logic.conf
}
if (toot_id)
msg.params['in_reply_to_id'] = (toot_id) + ""
@ -382,15 +421,14 @@ Page {
msg.params['spoiler_text'] = warningContent.text
}
worker.sendMessage(msg);
worker.sendMessage(msg)
warningContent.text = ""
toot.text = ""
mediaModel.clear()
pageStack.pop()
}
}
Rectangle {
id: uploadProgress
color: Theme.highlightBackgroundColor
@ -402,45 +440,46 @@ Page {
Component.onCompleted: {
toot.cursorPosition = toot.text.length
if (mdl.count > 0) {
var setIndex = 0;
var setIndex = 0
switch (mdl.get(0).status_visibility) {
case "unlisted":
setIndex = 1;
break;
setIndex = 1
break
case "private":
setIndex = 2;
break;
setIndex = 2
break
case "direct":
privacy.enabled = false;
setIndex = 3;
break;
privacy.enabled = false
setIndex = 3
break
default:
privacy.enabled = true;
setIndex = 0;
privacy.enabled = true
setIndex = 0
}
privacy.currentIndex = setIndex;
privacy.currentIndex = setIndex
}
console.log(JSON.stringify())
worker.sendMessage({
'action' : 'statuses/'+mdl.get(0).status_id+'/context',
'method' : 'GET',
'model' : mdl,
'params' : { },
'conf' : Logic.conf
});
"action": 'statuses/' + mdl.get(0).status_id + '/context',
"method": 'GET',
"model": mdl,
"params": { },
"conf": Logic.conf
})
}
Component {
id: firstWizardPage
Dialog {
id: emoticonsDialog
canAccept: false; //selector.currentIndex >= 0
//acceptDestination: conversationPage
canAccept: false //selector.currentIndex >= 0
//acceptDestination: conversationPage
onAcceptPendingChanged: {
if (acceptPending) {
// Tell the destination page what the selected category is
// acceptDestinationInstance.category = selector.value
}
@ -515,7 +554,6 @@ Page {
ListElement { section: "smileys"; glyph: "🙎" }
ListElement { section: "smileys"; glyph: "🙏" }
ListElement { section: "Transport and map"; glyph: "🚀" }
ListElement { section: "Transport and map"; glyph: "🚃" }
ListElement { section: "Transport and map"; glyph: "🚀" }
@ -561,11 +599,6 @@ Page {
ListElement { section: "Horoscope Signs"; glyph: "♑" }
ListElement { section: "Horoscope Signs"; glyph: "♒" }
ListElement { section: "Horoscope Signs"; glyph: "♓" }
}
delegate: BackgroundItem {
width: gridView.cellWidth
@ -578,11 +611,12 @@ Page {
}
onClicked: {
var cursorPosition = toot.cursorPosition
toot.text = toot.text.substring(0, cursorPosition) + model.glyph + toot.text.substring(cursorPosition)
toot.text = toot.text.substring(
0, cursorPosition) + model.glyph + toot.text.substring(
cursorPosition)
toot.cursorPosition = cursorPosition + model.glyph.length
emoticonsDialog.canAccept = true;
emoticonsDialog.canAccept = true
emoticonsDialog.accept()
}
}
}

View file

@ -37,7 +37,6 @@ import "../lib/API.js" as Logic
Page {
id: loginPage
// The effective value will be restricted by ApplicationWindow.allowedOrientations
allowedOrientations: Orientation.All
@ -62,7 +61,7 @@ Page {
TextField {
id: instance
focus: true
label: qsTr("Enter an Mastodon instance URL")
label: qsTr("Enter a valid Mastodon instance URL")
text: "https://"
placeholderText: "https://mastodon.social"
width: parent.width

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);
}

View file

@ -18,6 +18,7 @@ Page {
property int count_moments;
property string profile_background: "";
property string note: "";
property string url: "";
property bool locked : false;
property date created_at;
@ -28,7 +29,6 @@ Page {
property bool muting : false;
property bool domain_blocking : false;
WorkerScript {
id: worker
source: "../lib/Worker.js"
@ -68,9 +68,10 @@ Page {
following_count = messageObject.data
break;
case 'acct':
// line below was commented out, reason unknown
// username = messageObject.data
break;
case 'locked':
case 'locked':m
locked = messageObject.data
break;
case 'created_at':
@ -82,6 +83,9 @@ Page {
case 'note':
note = messageObject.data
break;
case 'url':
url = messageObject.data
break;
case 'following':
following = messageObject.data
followers_count = followers_count + (following ? 1 : - 1)
@ -238,10 +242,65 @@ Page {
}
}
/*ExpandingSection {
title: "Tweets"
ExpandingSection {
title: qsTr("Bio")
content.sourceComponent: Column {
spacing: Theme.paddingMedium
anchors.bottomMargin: Theme.paddingLarge
Text {
x: Theme.horizontalPageMargin
width: parent.width - ( 2 * Theme.horizontalPageMargin )
id: txtnote
text: note
font.pixelSize: Theme.fontSizeExtraSmall
color: Theme.secondaryColor
linkColor: Theme.secondaryHighlightColor
wrapMode: Text.Wrap
anchors {
horizontalCenter: parent.horizontalCenter
}
onLinkActivated: {
var test = link.split("/")
console.log(link)
console.log(JSON.stringify(test))
console.log(JSON.stringify(test.length))
}*/
if (test.length === 5 && (test[3] === "tags" || test[3] === "tag") ) {
pageStack.pop(pageStack.find(function(page) {
var check = page.isFirstPage === true;
if (check)
page.onLinkActivated(link)
return check;
}));
send(link)
} 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(link);
}
}
}
Column {
spacing: Theme.paddingMedium
anchors.horizontalCenter: parent.horizontalCenter
Button {
id: btnUrl
text: qsTr("Open Profile in Browser")
onClicked: {
Qt.openUrlExternally(url);
}
}
}
Label {
text: " "
}
}
}
}

View file

@ -57,29 +57,29 @@ Page {
IconTextSwitch {
//enabled: false
checked: typeof Logic.conf['loadImages'] !== "undefined" && Logic.conf['loadImages']
text: qsTr("Load images in toots")
text: qsTr("Load Images in Toots")
description: qsTr("Disable this option if you want to preserve your data connection")
icon.source: "image://theme/icon-m-mobile-network"
onClicked: {
Logic.conf['loadImages'] = checked
}
}
IconTextSwitch {
text: qsTr("Translate")
description: qsTr("Use Transifex to help with app translation to your language")
icon.source: "image://theme/icon-m-presence"
onCheckedChanged: {
busy = true;
checked = false;
Qt.openUrlExternally("https://www.transifex.com/dysko/tooter/");
timer2.start()
}
Timer {
id: timer2
interval: 4700
onTriggered: parent.busy = false
}
}
// IconTextSwitch {
// text: qsTr("Translate")
// description: qsTr("Use Transifex to help with app translation to your language")
// icon.source: "image://theme/icon-m-presence"
// onCheckedChanged: {
// busy = true;
// checked = false;
// Qt.openUrlExternally("https://www.transifex.com/dysko/tooter/");
// timer2.start()
// }
// Timer {
// id: timer2
// interval: 4700
// onTriggered: parent.busy = false
// }
// }
}
SectionHeader {
@ -113,6 +113,12 @@ Page {
}
Repeater {
model: ListModel {
ListElement {
name: "molan"
desc: qsTr("Maintainer of this release")
mastodon: ""
mail: "mol_an@sunrise.ch"
}
ListElement {
name: "Duško Angirević"
desc: qsTr("UI/UX design and development")
@ -121,38 +127,31 @@ Page {
}
ListElement {
name: "Miodrag Nikolić"
desc: "visual identity"
desc: qsTr("Visual identity")
mastodon: ""
mail: "micotakis@gmail.com"
}
ListElement {
name: "Molan"
desc: "Maintainer of this forked version"
mastodon: ""
mail: "mol_an@sunrise.ch"
}
ListElement {
name: "Quentin PAGÈS / Quenti ♏"
desc: "Occitan & French translation"
desc: qsTr("Occitan & French translation")
mastodon: "Quenti@framapiaf.org"
mail: ""
}
ListElement {
name: "André Koot"
desc: "Dutch translation"
desc: qsTr("Dutch translation")
mastodon: "meneer@mastodon.social"
mail: "https://twitter.com/meneer"
}
ListElement {
name: "Carlos Gonzalez / Caballlero"
desc: "Español translation"
desc: qsTr("Spanish translation")
mastodon: ""
mail: "carlosgonz@protonmail.com"
}
ListElement {
name: "Mohamed-Touhami MAHDI"
desc: "Added README file"
desc: qsTr("Added README file")
mastodon: "dragnucs@touha.me"
mail: "touhami@touha.me"
}

View file

@ -21,11 +21,10 @@ SilicaGridView {
unread: false
}
ListElement {
icon: "image://theme/icon-m-website"
slug: "federated"
name: "Federated"
icon: "image://theme/icon-m-alarm"
slug: "notifications"
name: "Notifications"
active: false
unread: false
}
ListElement {
icon: "image://theme/icon-m-whereami"
@ -35,10 +34,11 @@ SilicaGridView {
unread: false
}
ListElement {
icon: "image://theme/icon-m-alarm"
slug: "notifications"
name: "Notifications"
icon: "image://theme/icon-m-website"
slug: "federated"
name: "Federated"
active: false
unread: false
}
ListElement {
icon: "image://theme/icon-m-search"

View file

@ -4,7 +4,6 @@ import QtGraphicalEffects 1.0
BackgroundItem {
signal send (string notice)
id: delegate
//property string text: "0"
width: parent.width
@ -149,10 +148,9 @@ BackgroundItem {
console.log(link)
if (link[0] === "@") {
pageStack.push(Qt.resolvedUrl("../Profile.qml"), {
"display_name": account_display_name,
"username": account_username,
"user_id": model.account_id,
"profileImage": account_avatar
"name": "",
"username": link.substring(1),
"profileImage": ""
})
} else if (link[0] === "#") {

View file

@ -134,12 +134,10 @@ BackgroundItem {
}));
send(link)
} else if (test.length === 4 && test[3][0] === "@" ) {
pageStack.push(Qt.resolvedUrl("../Profile.qml"), {
"display_name": account_display_name,
"username": account_username,
"user_id": model.account_id,
"profileImage": account_avatar
})
tlSearch.search = decodeURIComponent("@"+test[3].substring(1)+"@"+test[2])
slideshow.positionViewAtIndex(4, ListView.SnapToItem)
navigation.navigateTo('search')
} else {
Qt.openUrlExternally(link);
}