1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

network: hide eth/wifi preference when apiVersion < 5

This commit is contained in:
bbedward
2025-10-17 08:23:56 -04:00
parent 4db55e4d77
commit b6f7f2734e

View File

@@ -30,6 +30,10 @@ Rectangle {
}
property int currentPreferenceIndex: {
if (DMSService.apiVersion < 5) {
return 1
}
const pref = NetworkService.userPreference
const status = NetworkService.networkStatus
let index = 1
@@ -72,7 +76,7 @@ Rectangle {
DankButtonGroup {
id: preferenceControls
anchors.verticalCenter: parent.verticalCenter
visible: true
visible: DMSService.apiVersion >= 5
model: ["Ethernet", "WiFi"]
currentIndex: currentPreferenceIndex
@@ -192,7 +196,7 @@ Rectangle {
anchors.bottom: parent.bottom
anchors.margins: Theme.spacingM
anchors.topMargin: Theme.spacingM
visible: currentPreferenceIndex === 0
visible: currentPreferenceIndex === 0 && DMSService.apiVersion >= 5
contentHeight: wiredColumn.height
clip: true