Qml App add option to control DHT behaviour

As bitDHT is very noisy and keeps the radio always on on mobile thus
having huge impact on the battery life, DHT is now turned on only when
the App is interacting with the user byt default, on the option tab it
is possible to change this behaviour to set it always off, always on or
active depending on user interaction.
To handle settings AppSettings singleton has been added and a button on
the sidebar to edit configurations too
This commit is contained in:
Gioacchino Mazzurco 2018-02-01 14:31:07 +01:00
parent 9a9fcca1a9
commit 1c698bff83
6 changed files with 152 additions and 1 deletions

View file

@ -214,6 +214,10 @@ Drawer
platformGW.shareUrl(nodeUrl);
})
},
"Options": function()
{
stackView.push("qrc:/Options.qml")
},
"Terminate Core": function()
{
rsApi.request("/control/shutdown");
@ -245,12 +249,17 @@ Drawer
icon: "/icons/share.svg"
}
ListElement
{
title: "Options"
showOnOsAndroid: false
icon: "/icons/options.svg"
}
ListElement
{
title: "Terminate Core"
showOnOsAndroid: false
icon: "/icons/exit.svg"
}
}
ScrollIndicator.vertical: ScrollIndicator { }