mirror of
https://github.com/mandarine3ds/mandarine.git
synced 2024-11-27 00:10:23 +00:00
Hide kick button if false
This commit is contained in:
parent
1691ca3999
commit
4595b68a8a
@ -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))
|
||||
}
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user