commit
91cbd92856
1 changed files with 5 additions and 5 deletions
|
@ -284,9 +284,9 @@ BackgroundItem {
|
||||||
id: mnuBoost
|
id: mnuBoost
|
||||||
visible: model.type !== "follow"
|
visible: model.type !== "follow"
|
||||||
enabled: status_visibility !== "direct"
|
enabled: status_visibility !== "direct"
|
||||||
text: typeof model.reblogged !== "undefined" && model.reblogged ? qsTr("Unboost") : qsTr("Boost")
|
text: typeof model.status_reblogged !== "undefined" && model.status_reblogged ? qsTr("Unboost") : qsTr("Boost")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var status = typeof model.reblogged !== "undefined" && model.reblogged
|
var status = typeof model.status_reblogged !== "undefined" && model.status_reblogged
|
||||||
worker.sendMessage({
|
worker.sendMessage({
|
||||||
"conf" : Logic.conf,
|
"conf" : Logic.conf,
|
||||||
"params" : [],
|
"params" : [],
|
||||||
|
@ -295,12 +295,12 @@ BackgroundItem {
|
||||||
"action" : "statuses/"+model.status_id+"/" + (status ? "unreblog" : "reblog")
|
"action" : "statuses/"+model.status_id+"/" + (status ? "unreblog" : "reblog")
|
||||||
})
|
})
|
||||||
model.status_reblogs_count = !status ? model.status_reblogs_count+1 : (model.status_reblogs_count > 0 ? model.status_reblogs_count-1 : model.status_reblogs_count);
|
model.status_reblogs_count = !status ? model.status_reblogs_count+1 : (model.status_reblogs_count > 0 ? model.status_reblogs_count-1 : model.status_reblogs_count);
|
||||||
model.reblogged = !model.reblogged
|
model.status_reblogged = !model.status_reblogged
|
||||||
}
|
}
|
||||||
|
|
||||||
Icon {
|
Icon {
|
||||||
id: icRT
|
id: icRT
|
||||||
source: "image://theme/icon-s-retweet?" + (!model.reblogged ? Theme.highlightColor : Theme.primaryColor)
|
source: "image://theme/icon-s-retweet?" + (!model.status_reblogged ? Theme.highlightColor : Theme.primaryColor)
|
||||||
width: Theme.iconSizeExtraSmall
|
width: Theme.iconSizeExtraSmall
|
||||||
height: width
|
height: width
|
||||||
anchors {
|
anchors {
|
||||||
|
@ -313,7 +313,7 @@ BackgroundItem {
|
||||||
Label {
|
Label {
|
||||||
text: status_reblogs_count // from API.js
|
text: status_reblogs_count // from API.js
|
||||||
font.pixelSize: Theme.fontSizeExtraSmall
|
font.pixelSize: Theme.fontSizeExtraSmall
|
||||||
color: !model.reblogged ? Theme.highlightColor : Theme.primaryColor
|
color: !model.status_reblogged ? Theme.highlightColor : Theme.primaryColor
|
||||||
anchors {
|
anchors {
|
||||||
left: icRT.right
|
left: icRT.right
|
||||||
leftMargin: Theme.paddingMedium
|
leftMargin: Theme.paddingMedium
|
||||||
|
|
Loading…
Reference in a new issue