commit what I've got

This commit is contained in:
Aria Moradi
2021-07-31 00:41:09 +04:30
parent 7c03c73419
commit 1ed9bcf7c8
2 changed files with 6 additions and 2 deletions
@@ -63,14 +63,19 @@ object Source {
val props: Any
)
var lastPreferenceScreen: PreferenceScreen? = null
fun getSourcePreferences(sourceId: Long): List<PreferenceObject> {
val source = getHttpSource(sourceId)
if (source is ConfigurableSource) {
val screen = PreferenceScreen(context)
lastPreferenceScreen = screen
source.setupPreferenceScreen(screen)
screen.preferences.first().callChangeListener("yo")
return screen.preferences.map {
PreferenceObject(it::class.java.name, it)
}