Hide kick button if false

This commit is contained in:
Gamer64 2024-08-31 20:35:29 +02:00
parent 1691ca3999
commit 4595b68a8a
2 changed files with 2 additions and 2 deletions

View File

@ -148,7 +148,7 @@ class NetPlayDialog(context: Context) : BaseSheetDialog(context) {
if (infos.isNotEmpty()) {
val roomTitle = context.getString(R.string.multiplayer_room_title, infos[0])
netPlayItems.add(NetPlayItems(NetPlayItems.MULTIPLAYER_ROOM_TEXT, roomTitle, NetPlayItems.TYPE_TEXT, 0))
if (NetPlayManager.netPlayIsHostedRoom()) {
if (false && NetPlayManager.netPlayIsHostedRoom()) {
for (i in 1 until infos.size) {
netPlayItems.add(NetPlayItems(NetPlayItems.MULTIPLAYER_ROOM_MEMBER, infos[i], NetPlayItems.TYPE_BUTTON, 0))
}

View File

@ -196,7 +196,7 @@ object NetPlayManager {
private fun getIpAddressByWifi(activity: Activity): String {
val wifiManager = activity.getSystemService(WifiManager::class.java)
val wifiInfo = wifiManager.connectionInfo
var ipAddress = wifiInfo?.ipAddress ?: wifiManager.dhcpInfo?.ipAddress ?: 0
val ipAddress = wifiInfo?.ipAddress ?: wifiManager.dhcpInfo?.ipAddress ?: 0
return if (ipAddress == 0) {
"192.168.0.1"