feat: test ms response

This commit is contained in:
rebelonion
2024-05-20 11:49:57 -05:00
parent 10df1986e8
commit fe1a7af7ac
5 changed files with 139 additions and 39 deletions

View File

@@ -5,6 +5,7 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.core.widget.addTextChangedListener
import androidx.recyclerview.widget.LinearLayoutManager
import ani.dantotsu.BottomSheetDialogFragment
import ani.dantotsu.databinding.BottomSheetExtensionTestSettingsBinding
@@ -39,6 +40,26 @@ class ExtensionTestSettingsBottomDialog : BottomSheetDialogFragment() {
LinearLayoutManager.VERTICAL,
false
)
binding.searchViewText.setText(searchQuery)
binding.searchViewText.addTextChangedListener {
searchQuery = it.toString()
}
binding.extensionTypeRadioGroup.check(
when (extensionType) {
"anime" -> binding.animeRadioButton.id
"manga" -> binding.mangaRadioButton.id
"novel" -> binding.novelsRadioButton.id
else -> binding.animeRadioButton.id
}
)
binding.testTypeRadioGroup.check(
when (testType) {
"ping" -> binding.pingRadioButton.id
"basic" -> binding.basicRadioButton.id
"full" -> binding.fullRadioButton.id
else -> binding.pingRadioButton.id
}
)
binding.animeRadioButton.setOnCheckedChangeListener { _, b ->
if (b) {
extensionType = "anime"
@@ -112,6 +133,7 @@ class ExtensionTestSettingsBottomDialog : BottomSheetDialogFragment() {
var extensionType = "anime"
var testType = "ping"
var searchQuery = "Chainsaw Man"
var extensionsToTest: MutableList<String> = mutableListOf()
}
}