fix: smol changes

This commit is contained in:
rebelonion 2024-04-30 19:39:19 -05:00
parent 2d2f058d27
commit 1431027cf3
6 changed files with 26 additions and 28 deletions

View file

@ -11,7 +11,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import ani.dantotsu.R
import ani.dantotsu.addons.AddonDownloader
import ani.dantotsu.addons.download.DownloadAddonManager
import ani.dantotsu.addons.torrent.ServerService
import ani.dantotsu.addons.torrent.TorrentServerService
import ani.dantotsu.addons.torrent.TorrentAddonManager
import ani.dantotsu.databinding.ActivitySettingsAddonsBinding
import ani.dantotsu.databinding.ItemSettingsBinding
@ -141,7 +141,7 @@ class SettingsAddonActivity : AppCompatActivity() {
}
it.settingsIconRight.setOnClickListener { _ ->
if (it.settingsDesc.text == getString(R.string.installed)) {
ServerService.stop()
TorrentServerService.stop()
torrentAddonManager.uninstall()
return@setOnClickListener
} else {
@ -190,14 +190,14 @@ class SettingsAddonActivity : AppCompatActivity() {
Injekt.get<TorrentAddonManager>().extension?.let {
if (isChecked) {
lifecycleScope.launchIO {
if (!ServerService.isRunning()) {
ServerService.start()
if (!TorrentServerService.isRunning()) {
TorrentServerService.start()
}
}
} else {
lifecycleScope.launchIO {
if (ServerService.isRunning()) {
ServerService.stop()
if (TorrentServerService.isRunning()) {
TorrentServerService.stop()
}
}
}