Skip to content

Commit

Permalink
chore: bump version + clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
timschneeb committed Dec 30, 2022
1 parent 9abb63e commit 45b1515
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,10 @@ class LiveprogParamsFragment : PreferenceFragmentCompat(), NonPersistentDatastor
currentProp.value = (newValue as? String)?.toIntOrNull() ?: 0
eelParser.manipulateProperty(currentProp)

//preference.summary = currentProp.options.getOrNull(currentProp.value) ?: getString(R.string.value_not_set)

updateResetMenuItem()
requireContext().sendLocalBroadcast(Intent(Constants.ACTION_SERVICE_RELOAD_LIVEPROG))
true
}
preference.setOnPreferenceClickListener {
//preferenceManager
//showListMenu(preference.getView, it)

true
}
screen.addPreference(preference)
}
else if(prop is EelNumberRangeProperty<*>) {
Expand All @@ -130,32 +122,6 @@ class LiveprogParamsFragment : PreferenceFragmentCompat(), NonPersistentDatastor
return screen
}

private fun showListMenu(v: View, prop: EelListProperty) {
val popup = PopupMenu(requireContext(), v)
prop.options.forEachIndexed { index, s ->
popup.menu.add(Menu.NONE, index, Menu.CATEGORY_CONTAINER, s)
}

popup.setOnMenuItemClickListener { menuItem: MenuItem ->
val currentProp = eelParser.properties.find { it.key == prop.key } as? EelListProperty
currentProp ?: return@setOnMenuItemClickListener false

Timber.d("List item '${menuItem.title}' with value ${menuItem.itemId} selected")

currentProp.value = menuItem.itemId
eelParser.manipulateProperty(currentProp)

val preference = this.preferenceManager.findPreference<Preference>(currentProp.key);
preference?.summary = currentProp.options.getOrNull(currentProp.value) ?: getString(R.string.value_not_set)

updateResetMenuItem()
requireContext().sendLocalBroadcast(Intent(Constants.ACTION_SERVICE_RELOAD_LIVEPROG))
true
}
popup.show()
}


override fun onCreateRecyclerView(
inflater: LayoutInflater,
parent: ViewGroup,
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/AndroidConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ object AndroidConfig {
const val compileSdk = 33
const val targetSdk = 33

const val versionName = "1.0.5"
const val versionCode = 14
const val versionName = "1.0.6"
const val versionCode = 15

const val kotlinVersion = "1.7.10"
const val kspVersion = "1.7.10-1.0.6"
Expand Down

0 comments on commit 45b1515

Please sign in to comment.