diff --git a/app/src/main/java/io/nekohasekai/sfa/ui/dashboard/GroupsFragment.kt b/app/src/main/java/io/nekohasekai/sfa/ui/dashboard/GroupsFragment.kt index b9dbf82..de5c080 100644 --- a/app/src/main/java/io/nekohasekai/sfa/ui/dashboard/GroupsFragment.kt +++ b/app/src/main/java/io/nekohasekai/sfa/ui/dashboard/GroupsFragment.kt @@ -212,12 +212,24 @@ class GroupsFragment : Fragment(), CommandClient.Handler { if (selected != group.selected) { updateSelected(group, selected) } + GlobalScope.launch { + runCatching { + Libbox.newStandaloneCommandClient() + .selectOutbound(group.tag, selected) + }.onFailure { + withContext(Dispatchers.Main) { + binding.root.context.errorDialogBuilder(it).show() + } + } + } } } } if (newExpandStatus) { + binding.urlTestButton.isVisible = true binding.expandButton.setImageResource(R.drawable.ic_expand_less_24) } else { + binding.urlTestButton.isVisible = false binding.expandButton.setImageResource(R.drawable.ic_expand_more_24) } binding.expandButton.setOnClickListener { diff --git a/app/src/main/res/layout/view_dashboard_group.xml b/app/src/main/res/layout/view_dashboard_group.xml index 1b12613..a361e1a 100644 --- a/app/src/main/res/layout/view_dashboard_group.xml +++ b/app/src/main/res/layout/view_dashboard_group.xml @@ -48,16 +48,6 @@ android:gravity="end" android:orientation="horizontal"> - - + +