Skip to content

Commit

Permalink
Merge pull request #66 from Xmasjos/feature/allReadRefreshAllSetting
Browse files Browse the repository at this point in the history
[Add] Setting for new top menu item `All read & Refresh all`
  • Loading branch information
poetaster committed Jun 4, 2021
2 parents 8be9db9 + ba9899c commit 938e5e9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
6 changes: 6 additions & 0 deletions qml/harbour-tidings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ ApplicationWindow
value: "1"
}

ConfigValue {
id: configEnableRefreshCombined
key: "menu-enable-refresh-combined"
value: "1"
}

ConfigValue {
id: configLoadImages
key: "view-load-images"
Expand Down
18 changes: 18 additions & 0 deletions qml/pages/SettingsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,24 @@ Page {
height: Theme.paddingLarge
}

TextSwitch {
width: parent.width
text: qsTr("Enable 'All read & Refresh all'")
description: qsTr("Whether to show or hide the top menu item for 'All read & Refresh all'")
automaticCheck: false
checked: configEnableRefreshCombined.booleanValue

onClicked: {
configEnableRefreshCombined.value =
configEnableRefreshCombined.booleanValue ? "0" : "1";
}
}

Item {
width: 1
height: Theme.paddingLarge
}

TextSwitch {
width: parent.width
text: qsTr("Load images automatically")
Expand Down
1 change: 1 addition & 0 deletions qml/pages/SourcesPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ Page {
}
}
MenuItem {
visible: configEnableRefreshCombined.booleanValue
text: newsBlendModel.busy ? qsTr("Abort refreshing")
: qsTr("All read & Refresh all")

Expand Down

0 comments on commit 938e5e9

Please sign in to comment.