Add Bio to Profile page
This commit is contained in:
parent
fd0621be69
commit
d388de5f9f
1 changed files with 66 additions and 7 deletions
|
@ -16,8 +16,9 @@ Page {
|
||||||
property int favourites_count;
|
property int favourites_count;
|
||||||
property int reblogs_count;
|
property int reblogs_count;
|
||||||
property int count_moments;
|
property int count_moments;
|
||||||
property string profile_background : "";
|
property string profile_background: "";
|
||||||
property string note: "";
|
property string note: "";
|
||||||
|
property string url: "";
|
||||||
|
|
||||||
property bool locked : false;
|
property bool locked : false;
|
||||||
property date created_at;
|
property date created_at;
|
||||||
|
@ -28,7 +29,6 @@ Page {
|
||||||
property bool muting : false;
|
property bool muting : false;
|
||||||
property bool domain_blocking : false;
|
property bool domain_blocking : false;
|
||||||
|
|
||||||
|
|
||||||
WorkerScript {
|
WorkerScript {
|
||||||
id: worker
|
id: worker
|
||||||
source: "../lib/Worker.js"
|
source: "../lib/Worker.js"
|
||||||
|
@ -68,9 +68,10 @@ Page {
|
||||||
following_count = messageObject.data
|
following_count = messageObject.data
|
||||||
break;
|
break;
|
||||||
case 'acct':
|
case 'acct':
|
||||||
//username = messageObject.data
|
// line below was commented out, reason unknown
|
||||||
|
// username = messageObject.data
|
||||||
break;
|
break;
|
||||||
case 'locked':
|
case 'locked':m
|
||||||
locked = messageObject.data
|
locked = messageObject.data
|
||||||
break;
|
break;
|
||||||
case 'created_at':
|
case 'created_at':
|
||||||
|
@ -82,6 +83,9 @@ Page {
|
||||||
case 'note':
|
case 'note':
|
||||||
note = messageObject.data
|
note = messageObject.data
|
||||||
break;
|
break;
|
||||||
|
case 'url':
|
||||||
|
url = messageObject.data
|
||||||
|
break;
|
||||||
case 'following':
|
case 'following':
|
||||||
following = messageObject.data
|
following = messageObject.data
|
||||||
followers_count = followers_count + (following ? 1 : - 1)
|
followers_count = followers_count + (following ? 1 : - 1)
|
||||||
|
@ -238,10 +242,65 @@ Page {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/*ExpandingSection {
|
ExpandingSection {
|
||||||
title: "Tweets"
|
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: qsTr(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: ("Open profile in browser")
|
||||||
|
onClicked: {
|
||||||
|
Qt.openUrlExternally(url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Label {
|
||||||
|
text: " "
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue