Add setting to hide photos in the timeline
This commit is contained in:
parent
b5bfd3e09e
commit
cf0919d06a
5 changed files with 73 additions and 8 deletions
|
@ -169,7 +169,7 @@ Container {
|
|||
}
|
||||
return isphoto
|
||||
}
|
||||
defaultImage: ptracker.image
|
||||
defaultImage: (postitem.ListItem.view.hidePhoto()) ? "" : ptracker.image
|
||||
onClicked: {
|
||||
postitem.ListItem.view.showImage(ptracker.imageSource)
|
||||
}
|
||||
|
|
|
@ -110,6 +110,45 @@ Page {
|
|||
}
|
||||
}
|
||||
Divider {}
|
||||
Container {
|
||||
layout: DockLayout {}
|
||||
horizontalAlignment: HorizontalAlignment.Fill
|
||||
verticalAlignment: VerticalAlignment.Fill
|
||||
Container {
|
||||
verticalAlignment: VerticalAlignment.Center
|
||||
leftPadding: ui.sdu(3)
|
||||
Label {
|
||||
text: qsTr("Hide photos")
|
||||
textStyle.fontSize: FontSize.Medium
|
||||
textStyle.fontWeight: FontWeight.Bold
|
||||
}
|
||||
Label {
|
||||
text: qsTr("Hide embeded photos in timeline")
|
||||
textStyle.fontSize: FontSize.Small
|
||||
multiline: true
|
||||
}
|
||||
}
|
||||
Container {
|
||||
id: imgtoggle
|
||||
rightPadding: ui.sdu(3)
|
||||
horizontalAlignment: HorizontalAlignment.Right
|
||||
verticalAlignment: VerticalAlignment.Center
|
||||
ToggleButton {
|
||||
checked: _app.setting("hidephoto")
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
_app.setSetting("hidephoto", true)
|
||||
reload()
|
||||
} else {
|
||||
_app.setSetting("hidephoto", false)
|
||||
reload()
|
||||
}
|
||||
}
|
||||
accessibility.name: "inlineimages"
|
||||
}
|
||||
}
|
||||
}
|
||||
Divider {}
|
||||
Container {
|
||||
leftPadding: ui.sdu(3)
|
||||
rightPadding: ui.sdu(3)
|
||||
|
|
|
@ -119,6 +119,15 @@ NavigationPane {
|
|||
return false
|
||||
}
|
||||
}
|
||||
function hidePhoto() {
|
||||
if (_app.setting("hidephoto") === "true") {
|
||||
console.log("HIDE IT!")
|
||||
return true
|
||||
} else {
|
||||
console.log("show me da photos")
|
||||
return false
|
||||
}
|
||||
}
|
||||
function copyText(text) {
|
||||
_app.copyText(text)
|
||||
}
|
||||
|
|
|
@ -66,6 +66,13 @@ Page {
|
|||
return false
|
||||
}
|
||||
}
|
||||
function hidePhoto() {
|
||||
if (_app.setting("hidephoto") === "true") {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
function showImage(filename) {
|
||||
_app.showImage(filename)
|
||||
}
|
||||
|
|
|
@ -185,17 +185,27 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/SettingsPage.qml" line="117"/>
|
||||
<location filename="../assets/SettingsPage.qml" line="121"/>
|
||||
<source>Hide photos</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/SettingsPage.qml" line="126"/>
|
||||
<source>Hide embeded photos in timeline</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/SettingsPage.qml" line="156"/>
|
||||
<source>Theme</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/SettingsPage.qml" line="119"/>
|
||||
<location filename="../assets/SettingsPage.qml" line="158"/>
|
||||
<source>Bright</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/SettingsPage.qml" line="124"/>
|
||||
<location filename="../assets/SettingsPage.qml" line="163"/>
|
||||
<source>Dark</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -203,22 +213,22 @@
|
|||
<context>
|
||||
<name>StreamTab</name>
|
||||
<message>
|
||||
<location filename="../assets/StreamTab.qml" line="155"/>
|
||||
<location filename="../assets/StreamTab.qml" line="164"/>
|
||||
<source>New Post</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/StreamTab.qml" line="169"/>
|
||||
<location filename="../assets/StreamTab.qml" line="178"/>
|
||||
<source>To Top</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/StreamTab.qml" line="197"/>
|
||||
<location filename="../assets/StreamTab.qml" line="206"/>
|
||||
<source>To Bottom</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/StreamTab.qml" line="184"/>
|
||||
<location filename="../assets/StreamTab.qml" line="193"/>
|
||||
<source>Reload</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
Reference in a new issue