V 0.1.5-1

- Autoload older tweets on the list end
- Displaying images on the timeline
- NSFW support for images
- Basic support for video (still buggy)
- Toot rendering reverted to the HTML
- Translations added: FR, NL, OC, ES
This commit is contained in:
Dusko Angirevic 2017-06-19 00:58:58 +02:00
parent b263196c07
commit affa006211
12 changed files with 143 additions and 55 deletions

Binary file not shown.

Binary file not shown.

View file

@ -107,6 +107,10 @@ Page {
focus = false
}
}
ViewPlaceholder {
enabled: Logic.modelTLsearch.count === 0
text: "Not implemented"
}
}
}
@ -155,7 +159,12 @@ Page {
}
function onLinkActivated(href){
if (href[0] === '#' || href[0] === '@' ) {
var test = href.split("/")
console.log(href)
console.log(JSON.stringify(test))
console.log(JSON.stringify(test.length))
if (test.length === 5 && (test[3] === "tags" || test[3] === "tag") ) {
tlSearch.search = "#"+test[4]
slideshow.positionViewAtIndex(3, ListView.SnapToItem)
navigation.navigateTo('search')

View file

@ -8,18 +8,37 @@ Page {
property string previewURL: ""
property string mediaURL: ""
allowedOrientations: Orientation.All
Component.onCompleted: {
console.log(type)
console.log(previewURL)
console.log(mediaURL)
}
onStateChanged: {
if (status === PageStatus.Deactivating){
video.stop()
}
if (status === PageStatus.Activating){
if (type !== "image" )
video.play()
}
}
BusyIndicator {
running: image.status !== Image.Ready
size: BusyIndicatorSize.Large
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
}
Item {
anchors.fill: parent
clip: true
Image {
id: image
anchors.centerIn: parent
//fillMode: Image.PreserveAspectCrop
fillMode: Image.PreserveAspectCrop
asynchronous: true
opacity: status === Image.Ready ? 1.0 : 0.0
Behavior on opacity { FadeAnimator {} }
source: mediaURL
source: type === "image" ? mediaURL : previewURL
onStatusChanged: {
if (status === Image.Ready) {
console.log('Loaded')
@ -31,17 +50,37 @@ Page {
pinch.scale = page.height / height
}
}
}
Video {
id: video
anchors.fill: parent
autoLoad: true
source: videoURL
onStateChanged: {
switch(status){
case MediaPlayer.Loaded:
play();
break;
case MediaPlayer.Loading:
loader.running = true;
break;
case MediaPlayer.EndOfMedia:
if(seekable)
seek(0)
break;
default:
loader.running = false;
}
}
source: type !== "image" ? mediaURL : ""
onErrorStringChanged: {
console.log(errorString)
}
BusyIndicator {
id: loader
size: BusyIndicatorSize.Small
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
}
MouseArea {
anchors.fill: parent
@ -53,14 +92,28 @@ Page {
focus: true
}
}
PinchArea {
id: pinch
visible: videoURL === ""
visible: type === "image"
anchors.fill: parent
pinch.target: image
pinch.minimumScale: 0.1
pinch.maximumScale: 10
pinch.dragAxis: Pinch.XAndYAxis
}
Label {
visible: type !== "image"
anchors {
bottom: parent.bottom
left: parent.left
right: parent.right
}
text: "Video playing is faulty... may break app... Just to know :)"
}
}
}

View file

@ -87,11 +87,6 @@ Item {
return false
}
}
Image {
visible: model.count && (model.get(0).type === "video" || model.get(0).type === "gifv")
anchors.centerIn: parent
source: "image://theme/icon-l-play"
}
}
MyImage {
id: placeholder2

View file

@ -7,6 +7,7 @@ Item {
property string previewURL: ""
property string mediaURL: ""
Image {
id: img
anchors.fill: parent
fillMode: Image.PreserveAspectCrop
asynchronous: true
@ -19,5 +20,30 @@ Item {
pageStack.push(Qt.resolvedUrl("./ImageFullScreen.qml"), {"previewURL": previewURL, "mediaURL": mediaURL, "type": type})
}
}
Image {
visible: type === "video" || type === "gifv"
anchors.centerIn: parent
source: "image://theme/icon-l-play"
}
BusyIndicator {
size: BusyIndicatorSize.Large
running: img.status !== Image.Ready
opacity: img.status === Image.Ready ? 0.0 : 1.0
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
}
Rectangle {
anchors.fill: parent
color: Theme.highlightDimmerColor
visible: status_sensitive
Image {
source: "image://theme/icon-l-attention?"+Theme.highlightColor
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
onClicked: parent.visible = false;
}
}
}
}

View file

@ -124,7 +124,7 @@ SilicaListView {
BusyIndicator {
size: BusyIndicatorSize.Small
running: loadStarted;
//anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
}
}

View file

@ -88,8 +88,30 @@ BackgroundItem {
}
height: content.length ? paintedHeight : 0
onLinkActivated: {
var test = link.split("/")
console.log(link)
if (link[0] === "@") {
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] === "@" ) {
pageStack.push(Qt.resolvedUrl("../Profile.qml"), {
"name": "",
"username": test[3].substring(1),
"profileImage": ""
})
} else {
pageStack.push(Qt.resolvedUrl("Browser.qml"), {"href" : href})
}
/*if (link[0] === "@") {
pageStack.push(Qt.resolvedUrl("../Profile.qml"), {
"name": "",
"username": link.substring(1),
@ -97,17 +119,10 @@ BackgroundItem {
})
} else if (link[0] === "#") {
pageStack.pop(pageStack.find(function(page) {
var check = page.isFirstPage === true;
if (check)
page.onLinkActivated(link)
return check;
}));
send(link)
} else {
pageStack.push(Qt.resolvedUrl("../Browser.qml"), {"href" : link})
}
}*/
}
@ -129,19 +144,6 @@ BackgroundItem {
}
model: typeof attachments !== "undefined" ? attachments : []
height: 100
Rectangle {
anchors.fill: parent
color: Theme.highlightDimmerColor
visible: status_sensitive
Image {
source: "image://theme/icon-l-attention?"+Theme.highlightColor
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
onClicked: parent.visible = false;
}
}
}

View file

@ -8,7 +8,11 @@
# * date Author's Name <author's email> version-release
# - Summary of changes
* Sun Apr 13 2014 Jack Tar <jack.tar@example.com> 0.0.1-1
- Scrubbed the deck
- Hoisted the sails
* Mon Jun 19 2017 Dusko Angirevic <dysko@me.com> 0.1.5-1
- Autoload older tweets on the list end
- Displaying images on the timeline
- NSFW support for images
- Basic support for video (still buggy)
- Toot rendering reverted to the HTML
- Translations added: FR, NL, OC, ES

View file

@ -13,7 +13,7 @@ Name: harbour-tooter
%{!?qtc_make:%define qtc_make make}
%{?qtc_builddir:%define _builddir %qtc_builddir}
Summary: Tooter
Version: 0.1.4
Version: 0.1.5
Release: 1
Group: Qt/Qt
License: LICENSE

View file

@ -1,6 +1,6 @@
Name: harbour-tooter
Summary: Tooter
Version: 0.1.4
Version: 0.1.5
Release:
# The contents of the Group field should be one of the groups listed here:
# http://gitorious.org/meego-developer-tools/spectacle/blobs/master/data/GROUPS

View file

@ -5,7 +5,6 @@
<name></name>
<message id="Logout">
<source></source>
<translation>Se desconnectar</translation>
</message>
<message id="Login">