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 focus = false
} }
} }
ViewPlaceholder {
enabled: Logic.modelTLsearch.count === 0
text: "Not implemented"
}
} }
} }
@ -155,7 +159,12 @@ Page {
} }
function onLinkActivated(href){ 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) slideshow.positionViewAtIndex(3, ListView.SnapToItem)
navigation.navigateTo('search') navigation.navigateTo('search')

View file

@ -8,18 +8,37 @@ Page {
property string previewURL: "" property string previewURL: ""
property string mediaURL: "" property string mediaURL: ""
allowedOrientations: Orientation.All 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 { Item {
anchors.fill: parent anchors.fill: parent
clip: true clip: true
Image { Image {
id: image id: image
anchors.centerIn: parent anchors.centerIn: parent
//fillMode: Image.PreserveAspectCrop fillMode: Image.PreserveAspectCrop
asynchronous: true asynchronous: true
opacity: status === Image.Ready ? 1.0 : 0.0 opacity: status === Image.Ready ? 1.0 : 0.0
Behavior on opacity { FadeAnimator {} } Behavior on opacity { FadeAnimator {} }
source: mediaURL source: type === "image" ? mediaURL : previewURL
onStatusChanged: { onStatusChanged: {
if (status === Image.Ready) { if (status === Image.Ready) {
console.log('Loaded') console.log('Loaded')
@ -31,36 +50,70 @@ Page {
pinch.scale = page.height / height pinch.scale = page.height / height
} }
} }
Video {
} id: video
Video {
id: video
anchors.fill: parent
autoLoad: true
source: videoURL
onErrorStringChanged: {
console.log(errorString)
}
MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: { autoLoad: true
video.playbackState == MediaPlayer.PlayingState ? video.pause() : video.play() 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
onClicked: {
video.playbackState == MediaPlayer.PlayingState ? video.pause() : video.play()
}
}
focus: true
} }
focus: true
} }
PinchArea { PinchArea {
id: pinch id: pinch
visible: videoURL === "" visible: type === "image"
anchors.fill: parent anchors.fill: parent
pinch.target: image pinch.target: image
pinch.minimumScale: 0.1 pinch.minimumScale: 0.1
pinch.maximumScale: 10 pinch.maximumScale: 10
pinch.dragAxis: Pinch.XAndYAxis 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 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 { MyImage {
id: placeholder2 id: placeholder2

View file

@ -7,6 +7,7 @@ Item {
property string previewURL: "" property string previewURL: ""
property string mediaURL: "" property string mediaURL: ""
Image { Image {
id: img
anchors.fill: parent anchors.fill: parent
fillMode: Image.PreserveAspectCrop fillMode: Image.PreserveAspectCrop
asynchronous: true asynchronous: true
@ -19,5 +20,30 @@ Item {
pageStack.push(Qt.resolvedUrl("./ImageFullScreen.qml"), {"previewURL": previewURL, "mediaURL": mediaURL, "type": type}) 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 { BusyIndicator {
size: BusyIndicatorSize.Small size: BusyIndicatorSize.Small
running: loadStarted; running: loadStarted;
//anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
} }

View file

@ -88,8 +88,30 @@ BackgroundItem {
} }
height: content.length ? paintedHeight : 0 height: content.length ? paintedHeight : 0
onLinkActivated: { onLinkActivated: {
var test = link.split("/")
console.log(link) 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"), { pageStack.push(Qt.resolvedUrl("../Profile.qml"), {
"name": "", "name": "",
"username": link.substring(1), "username": link.substring(1),
@ -97,17 +119,10 @@ BackgroundItem {
}) })
} else if (link[0] === "#") { } 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 { } else {
pageStack.push(Qt.resolvedUrl("../Browser.qml"), {"href" : link}) pageStack.push(Qt.resolvedUrl("../Browser.qml"), {"href" : link})
} }*/
} }
@ -129,19 +144,6 @@ BackgroundItem {
} }
model: typeof attachments !== "undefined" ? attachments : [] model: typeof attachments !== "undefined" ? attachments : []
height: 100 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 # * date Author's Name <author's email> version-release
# - Summary of changes # - Summary of changes
* Sun Apr 13 2014 Jack Tar <jack.tar@example.com> 0.0.1-1 * Mon Jun 19 2017 Dusko Angirevic <dysko@me.com> 0.1.5-1
- Scrubbed the deck - Autoload older tweets on the list end
- Hoisted the sails - 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_make:%define qtc_make make}
%{?qtc_builddir:%define _builddir %qtc_builddir} %{?qtc_builddir:%define _builddir %qtc_builddir}
Summary: Tooter Summary: Tooter
Version: 0.1.4 Version: 0.1.5
Release: 1 Release: 1
Group: Qt/Qt Group: Qt/Qt
License: LICENSE License: LICENSE

View file

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

View file

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