diff --git a/app/src/main/java/io/nekohasekai/sfa/bg/BoxService.kt b/app/src/main/java/io/nekohasekai/sfa/bg/BoxService.kt index 5c756ca..f18100c 100644 --- a/app/src/main/java/io/nekohasekai/sfa/bg/BoxService.kt +++ b/app/src/main/java/io/nekohasekai/sfa/bg/BoxService.kt @@ -88,7 +88,7 @@ class BoxService( private fun startCommandServer() { val commandServer = - CommandServer(Application.application.filesDir.absolutePath, this) + CommandServer(Application.application.filesDir.absolutePath, this, 300) commandServer.start() this.commandServer = commandServer } @@ -160,10 +160,6 @@ class BoxService( } } - override fun serviceStop() { - - } - private fun stopService() { if (status.value != Status.Started) return status.value = Status.Stopping diff --git a/app/src/main/java/io/nekohasekai/sfa/ui/main/DashboardFragment.kt b/app/src/main/java/io/nekohasekai/sfa/ui/main/DashboardFragment.kt index 1ba5cc9..21a8280 100644 --- a/app/src/main/java/io/nekohasekai/sfa/ui/main/DashboardFragment.kt +++ b/app/src/main/java/io/nekohasekai/sfa/ui/main/DashboardFragment.kt @@ -15,6 +15,7 @@ import io.nekohasekai.libbox.CommandClient import io.nekohasekai.libbox.CommandClientHandler import io.nekohasekai.libbox.CommandClientOptions import io.nekohasekai.libbox.Libbox +import io.nekohasekai.libbox.OutboundGroupIterator import io.nekohasekai.libbox.StatusMessage import io.nekohasekai.sfa.R import io.nekohasekai.sfa.bg.BoxService @@ -166,6 +167,9 @@ class DashboardFragment : Fragment(), CommandClientHandler { } } + override fun writeGroups(message: OutboundGroupIterator?) { + } + class Adapter( internal val scope: CoroutineScope, private val parent: FragmentDashboardBinding @@ -264,7 +268,7 @@ class DashboardFragment : Fragment(), CommandClientHandler { return } runCatching { - Libbox.clientServiceReload(mainActivity.filesDir.absolutePath) + Libbox.newStandaloneCommandClient(mainActivity.filesDir.absolutePath).serviceReload() }.onFailure { withContext(Dispatchers.Main) { mainActivity.errorDialogBuilder(it).show()