fetch proper event type at editing tasks
This commit is contained in:
parent
22290656d5
commit
113963cee3
|
@ -113,6 +113,8 @@ class TaskActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun gotTask(savedInstanceState: Bundle?, task: Event?) {
|
private fun gotTask(savedInstanceState: Bundle?, task: Event?) {
|
||||||
|
mEventTypeId = if (config.defaultEventTypeId == -1L) config.lastUsedLocalEventTypeId else config.defaultEventTypeId
|
||||||
|
|
||||||
if (task != null) {
|
if (task != null) {
|
||||||
mTask = task
|
mTask = task
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
|
@ -130,8 +132,6 @@ class TaskActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mEventTypeId = if (config.defaultEventTypeId == -1L) config.lastUsedLocalEventTypeId else config.defaultEventTypeId
|
|
||||||
|
|
||||||
task_all_day.setOnCheckedChangeListener { compoundButton, isChecked -> toggleAllDay(isChecked) }
|
task_all_day.setOnCheckedChangeListener { compoundButton, isChecked -> toggleAllDay(isChecked) }
|
||||||
task_all_day_holder.setOnClickListener {
|
task_all_day_holder.setOnClickListener {
|
||||||
task_all_day.toggle()
|
task_all_day.toggle()
|
||||||
|
@ -153,6 +153,7 @@ class TaskActivity : SimpleActivity() {
|
||||||
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN)
|
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN)
|
||||||
updateActionBarTitle(getString(R.string.edit_task))
|
updateActionBarTitle(getString(R.string.edit_task))
|
||||||
|
|
||||||
|
mEventTypeId = mTask.eventType
|
||||||
task_title.setText(mTask.title)
|
task_title.setText(mTask.title)
|
||||||
task_description.setText(mTask.description)
|
task_description.setText(mTask.description)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue