fix EditQuickWizardDialog
This commit is contained in:
parent
22eb524556
commit
2b20aa3e38
|
@ -100,19 +100,19 @@ class EditQuickWizardDialog : DaggerDialogFragment(), View.OnClickListener {
|
|||
|
||||
val toTimeSetListener = TimePickerDialog.OnTimeSetListener { _, hour, minute ->
|
||||
toSeconds = (T.hours(hour.toLong()).secs() + T.mins(minute.toLong()).secs()).toInt()
|
||||
binding.from.text = dateUtil.timeString(dateUtil.secondsOfTheDayToMilliseconds(toSeconds))
|
||||
binding.to.text = dateUtil.timeString(dateUtil.secondsOfTheDayToMilliseconds(toSeconds))
|
||||
}
|
||||
|
||||
binding.to.setOnClickListener {
|
||||
context?.let {
|
||||
TimePickerDialog(it, toTimeSetListener,
|
||||
T.secs(fromSeconds.toLong()).hours().toInt(),
|
||||
T.secs((fromSeconds % 3600).toLong()).mins().toInt(),
|
||||
T.secs(toSeconds.toLong()).hours().toInt(),
|
||||
T.secs((toSeconds % 3600).toLong()).mins().toInt(),
|
||||
DateFormat.is24HourFormat(context)
|
||||
).show()
|
||||
}
|
||||
}
|
||||
toSeconds = entry.validFrom()
|
||||
toSeconds = entry.validTo()
|
||||
binding.to.text = dateUtil.timeString(dateUtil.secondsOfTheDayToMilliseconds(toSeconds))
|
||||
|
||||
binding.buttonEdit.setText(entry.buttonText())
|
||||
|
|
|
@ -132,7 +132,7 @@ class QuickWizardEntry @Inject constructor(private val injector: HasAndroidInjec
|
|||
|
||||
fun validFrom(): Int = safeGetInt(storage, "validFrom")
|
||||
|
||||
private fun validTo(): Int = safeGetInt(storage, "validTo")
|
||||
fun validTo(): Int = safeGetInt(storage, "validTo")
|
||||
|
||||
fun useBG(): Int = safeGetInt(storage, "useBG", YES)
|
||||
|
||||
|
|
Loading…
Reference in a new issue