mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-23 19:45:21 -04:00
fix(network): fix excessive network prompting on failures, add VPN
connection statuses
This commit is contained in:
@@ -135,6 +135,8 @@ func (m *Manager) syncStateFromBackend() error {
|
||||
m.state.ConnectingSSID = backendState.ConnectingSSID
|
||||
m.state.ConnectingDevice = backendState.ConnectingDevice
|
||||
m.state.LastError = backendState.LastError
|
||||
m.state.VPNError = backendState.VPNError
|
||||
m.state.VPNErrorUuid = backendState.VPNErrorUuid
|
||||
m.stateMutex.Unlock()
|
||||
|
||||
return nil
|
||||
@@ -216,6 +218,9 @@ func stateChangedMeaningfully(old, new *NetworkState) bool {
|
||||
if old.LastError != new.LastError {
|
||||
return true
|
||||
}
|
||||
if old.VPNError != new.VPNError || old.VPNErrorUuid != new.VPNErrorUuid {
|
||||
return true
|
||||
}
|
||||
if len(old.WiFiNetworks) != len(new.WiFiNetworks) {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user