ui: simplify actionmode cast
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
4fcb8c4792
commit
e5a75307c2
@ -39,8 +39,6 @@ import kotlinx.coroutines.SupervisorJob
|
|||||||
import kotlinx.coroutines.async
|
import kotlinx.coroutines.async
|
||||||
import kotlinx.coroutines.awaitAll
|
import kotlinx.coroutines.awaitAll
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import java.util.ArrayList
|
|
||||||
import java.util.HashSet
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fragment containing a list of known WireGuard tunnels. It allows creating and deleting tunnels.
|
* Fragment containing a list of known WireGuard tunnels. It allows creating and deleting tunnels.
|
||||||
@ -270,7 +268,7 @@ class TunnelListFragment : BaseFragment() {
|
|||||||
}
|
}
|
||||||
val adapter = if (binding == null) null else binding!!.tunnelList.adapter
|
val adapter = if (binding == null) null else binding!!.tunnelList.adapter
|
||||||
if (actionMode == null && !checkedItems.isEmpty() && activity != null) {
|
if (actionMode == null && !checkedItems.isEmpty() && activity != null) {
|
||||||
(activity as AppCompatActivity?)!!.startSupportActionMode(this)
|
(activity as AppCompatActivity).startSupportActionMode(this)
|
||||||
} else if (actionMode != null && checkedItems.isEmpty()) {
|
} else if (actionMode != null && checkedItems.isEmpty()) {
|
||||||
actionMode!!.finish()
|
actionMode!!.finish()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user