mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-04-29 22:24:29 +02:00
Rename to direct and relayed.
This commit is contained in:
parent
5b2f8b8617
commit
b025e8a30f
@ -2,6 +2,6 @@ package com.futo.platformplayer.sync.internal;
|
|||||||
|
|
||||||
public enum LinkType {
|
public enum LinkType {
|
||||||
None,
|
None,
|
||||||
Local,
|
Direct,
|
||||||
Proxied
|
Relayed
|
||||||
}
|
}
|
||||||
|
@ -35,25 +35,25 @@ class SyncSession : IAuthorizable {
|
|||||||
|
|
||||||
val linkType: LinkType get()
|
val linkType: LinkType get()
|
||||||
{
|
{
|
||||||
var hasProxied = false
|
var hasRelayed = false
|
||||||
var hasDirect = false
|
var hasDirect = false
|
||||||
synchronized(_channels)
|
synchronized(_channels)
|
||||||
{
|
{
|
||||||
for (channel in _channels)
|
for (channel in _channels)
|
||||||
{
|
{
|
||||||
if (channel is ChannelRelayed)
|
if (channel is ChannelRelayed)
|
||||||
hasProxied = true
|
hasRelayed = true
|
||||||
if (channel is ChannelSocket)
|
if (channel is ChannelSocket)
|
||||||
hasDirect = true
|
hasDirect = true
|
||||||
if (hasProxied && hasDirect)
|
if (hasRelayed && hasDirect)
|
||||||
return LinkType.Local
|
return LinkType.Direct
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasProxied)
|
if (hasRelayed)
|
||||||
return LinkType.Proxied
|
return LinkType.Relayed
|
||||||
if (hasDirect)
|
if (hasDirect)
|
||||||
return LinkType.Local
|
return LinkType.Direct
|
||||||
return LinkType.None
|
return LinkType.None
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,13 +43,13 @@ class SyncDeviceView : ConstraintLayout {
|
|||||||
|
|
||||||
_layoutLinkType.visibility = View.VISIBLE
|
_layoutLinkType.visibility = View.VISIBLE
|
||||||
_imageLinkType.setImageResource(when (linkType) {
|
_imageLinkType.setImageResource(when (linkType) {
|
||||||
LinkType.Proxied -> R.drawable.ic_internet
|
LinkType.Relayed -> R.drawable.ic_internet
|
||||||
LinkType.Local -> R.drawable.ic_lan
|
LinkType.Direct -> R.drawable.ic_lan
|
||||||
else -> 0
|
else -> 0
|
||||||
})
|
})
|
||||||
_textLinkType.text = when(linkType) {
|
_textLinkType.text = when(linkType) {
|
||||||
LinkType.Proxied -> "Proxied"
|
LinkType.Relayed -> "Relayed"
|
||||||
LinkType.Local -> "Local"
|
LinkType.Direct -> "Direct"
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user