mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
do not show the Mark in/complete task button at duplicating task
This commit is contained in:
@ -119,14 +119,15 @@ class TaskActivity : SimpleActivity() {
|
|||||||
|
|
||||||
if (task != null) {
|
if (task != null) {
|
||||||
mTask = task
|
mTask = task
|
||||||
if (savedInstanceState == null) {
|
|
||||||
setupEditTask()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (intent.getBooleanExtra(IS_DUPLICATE_INTENT, false)) {
|
if (intent.getBooleanExtra(IS_DUPLICATE_INTENT, false)) {
|
||||||
mTask.id = null
|
mTask.id = null
|
||||||
updateActionBarTitle(getString(R.string.new_task))
|
updateActionBarTitle(getString(R.string.new_task))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (savedInstanceState == null) {
|
||||||
|
setupEditTask()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mTask = Event(null)
|
mTask = Event(null)
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
@ -275,7 +276,7 @@ class TaskActivity : SimpleActivity() {
|
|||||||
|
|
||||||
private fun setupMarkCompleteButton() {
|
private fun setupMarkCompleteButton() {
|
||||||
toggle_mark_complete.setOnClickListener { toggleCompletion() }
|
toggle_mark_complete.setOnClickListener { toggleCompletion() }
|
||||||
toggle_mark_complete.beVisible()
|
toggle_mark_complete.beVisibleIf(mTask.id != null)
|
||||||
if (mTask.isTaskCompleted()) {
|
if (mTask.isTaskCompleted()) {
|
||||||
toggle_mark_complete.background = ContextCompat.getDrawable(this, R.drawable.button_background_stroke)
|
toggle_mark_complete.background = ContextCompat.getDrawable(this, R.drawable.button_background_stroke)
|
||||||
toggle_mark_complete.setText(R.string.mark_incomplete)
|
toggle_mark_complete.setText(R.string.mark_incomplete)
|
||||||
|
Reference in New Issue
Block a user