mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-30 00:12:50 -05:00
network: hide eth/wifi preference when apiVersion < 5
This commit is contained in:
@@ -30,6 +30,10 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
property int currentPreferenceIndex: {
|
property int currentPreferenceIndex: {
|
||||||
|
if (DMSService.apiVersion < 5) {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
const pref = NetworkService.userPreference
|
const pref = NetworkService.userPreference
|
||||||
const status = NetworkService.networkStatus
|
const status = NetworkService.networkStatus
|
||||||
let index = 1
|
let index = 1
|
||||||
@@ -72,7 +76,7 @@ Rectangle {
|
|||||||
DankButtonGroup {
|
DankButtonGroup {
|
||||||
id: preferenceControls
|
id: preferenceControls
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
visible: true
|
visible: DMSService.apiVersion >= 5
|
||||||
|
|
||||||
model: ["Ethernet", "WiFi"]
|
model: ["Ethernet", "WiFi"]
|
||||||
currentIndex: currentPreferenceIndex
|
currentIndex: currentPreferenceIndex
|
||||||
@@ -192,7 +196,7 @@ Rectangle {
|
|||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.margins: Theme.spacingM
|
anchors.margins: Theme.spacingM
|
||||||
anchors.topMargin: Theme.spacingM
|
anchors.topMargin: Theme.spacingM
|
||||||
visible: currentPreferenceIndex === 0
|
visible: currentPreferenceIndex === 0 && DMSService.apiVersion >= 5
|
||||||
contentHeight: wiredColumn.height
|
contentHeight: wiredColumn.height
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user