Skip to content

Commit

Permalink
Allow only spaces SSID when configuring home network wifi (#3354) (#4674
Browse files Browse the repository at this point in the history
)

* Allow only spaces SSID when configuring home network wifi (#3354)

* changed check to control only for empty string
  • Loading branch information
frenk91 authored Sep 27, 2024
1 parent 505e3b0 commit 3d88f4c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ class SsidViewModel @Inject constructor(
* @return `true` if the SSID was successfully added
*/
fun addHomeWifiSsid(ssid: String): Boolean {
if (ssid.isBlank() || wifiSsids.any { it == ssid.trim() }) return false
setHomeWifiSsids((wifiSsids + ssid.trim()).sorted())
if (ssid.isEmpty()) return false
setHomeWifiSsids((wifiSsids + ssid).sorted())
return true
}

Expand Down

0 comments on commit 3d88f4c

Please sign in to comment.