File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
ui/src/main/java/com/wireguard/android/fragment Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -63,13 +63,17 @@ class TunnelDetailFragment : BaseFragment() {
63
63
}
64
64
65
65
override fun onSelectedTunnelChanged (oldTunnel : ObservableTunnel ? , newTunnel : ObservableTunnel ? ) {
66
- binding ? : return
67
- binding!! .tunnel = newTunnel
68
- if (newTunnel == null ) binding!! .config = null else lifecycleScope.launch {
69
- try {
70
- binding!! .config = newTunnel.getConfigAsync()
71
- } catch (_: Throwable ) {
72
- binding!! .config = null
66
+ val binding = binding ? : return
67
+ binding.tunnel = newTunnel
68
+ if (newTunnel == null ) {
69
+ binding.config = null
70
+ } else {
71
+ lifecycleScope.launch {
72
+ try {
73
+ binding.config = newTunnel.getConfigAsync()
74
+ } catch (_: Throwable ) {
75
+ binding.config = null
76
+ }
73
77
}
74
78
}
75
79
lastState = Tunnel .State .TOGGLE
You can’t perform that action at this time.
0 commit comments