fix for empty SSID

This commit is contained in:
Jérémy Munsch 2023-08-08 11:18:47 +02:00
parent 85a003c42d
commit edb556f2a3
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC

View file

@ -202,7 +202,7 @@ class KioskDiagnosticActivity : AppCompatActivity(), View.OnClickListener {
var precisePercent = if (it.level <= -100) 0 else if(it.level >= -50) 100 else 2 * (it.level + 100);
val row = LayoutInflater.from(this@KioskDiagnosticActivity)
.inflate(R.layout.activity_kiosk_diagnostic_wifi_row, null) as TableRow
(row.findViewById<View>(R.id.tableCellSSID) as TextView).text = if (it.SSID.trim() === "") it.BSSID else it.SSID
(row.findViewById<View>(R.id.tableCellSSID) as TextView).text = if (it.SSID.length === 0) it.BSSID else it.SSID
(row.findViewById<View>(R.id.tableCellSignal) as TextView).text = it.level.toString()
(row.findViewById<View>(R.id.tableCellSignalPercent) as TextView).text = "$precisePercent %"
(row.findViewById<View>(R.id.tableCellSignalFreq) as TextView).text = getWifiType(it.frequency)