add openSettings

master
C10udburst 2022-08-11 11:17:15 +02:00
parent 1f7ee744ef
commit db8f88f398
3 changed files with 9 additions and 7 deletions

View File

@ -26,6 +26,10 @@ cloudstream {
adult = true
requiresResources = true
language = "en"
// random cc logo i found
iconUrl = "https://upload.wikimedia.org/wikipedia/commons/2/2f/Korduene_Logo.png"
}
android {

View File

@ -15,5 +15,10 @@ class TestPlugin: Plugin() {
activity = context as AppCompatActivity
// All providers should be added in this manner
registerMainAPI(ExampleProvider(this))
openSettings = { ctx ->
val frag = BlankFragment(this)
frag.show(activity!!.supportFragmentManager, "sexFrag")
}
}
}

View File

@ -17,13 +17,6 @@ class ExampleProvider(val plugin: TestPlugin) : MainAPI() { // all providers mus
// this function gets called when you search for something
override suspend fun search(query: String): List<SearchResponse> {
if (query == "openFragment") {
val frag = BlankFragment(plugin)
frag.show(plugin.activity!!.supportFragmentManager, "sexFrag")
}
return listOf<SearchResponse>()
}
}