mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2024-12-11 08:16:35 +01:00
implementing task deleting
This commit is contained in:
parent
c3e1f4b5d8
commit
301daafb59
@ -8,13 +8,11 @@ import android.view.MenuItem
|
|||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import com.simplemobiletools.calendar.pro.R
|
import com.simplemobiletools.calendar.pro.R
|
||||||
import com.simplemobiletools.calendar.pro.dialogs.SelectEventTypeDialog
|
import com.simplemobiletools.calendar.pro.dialogs.SelectEventTypeDialog
|
||||||
import com.simplemobiletools.calendar.pro.extensions.config
|
import com.simplemobiletools.calendar.pro.extensions.*
|
||||||
import com.simplemobiletools.calendar.pro.extensions.eventTypesDB
|
|
||||||
import com.simplemobiletools.calendar.pro.extensions.eventsDB
|
|
||||||
import com.simplemobiletools.calendar.pro.extensions.seconds
|
|
||||||
import com.simplemobiletools.calendar.pro.helpers.*
|
import com.simplemobiletools.calendar.pro.helpers.*
|
||||||
import com.simplemobiletools.calendar.pro.helpers.Formatter
|
import com.simplemobiletools.calendar.pro.helpers.Formatter
|
||||||
import com.simplemobiletools.calendar.pro.models.Event
|
import com.simplemobiletools.calendar.pro.models.Event
|
||||||
|
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||||
import kotlinx.android.synthetic.main.activity_event.*
|
import kotlinx.android.synthetic.main.activity_event.*
|
||||||
@ -193,7 +191,18 @@ class TaskActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun deleteTask() {}
|
private fun deleteTask() {
|
||||||
|
ConfirmationDialog(this) {
|
||||||
|
ensureBackgroundThread {
|
||||||
|
eventsHelper.deleteEvent(mTask.id!!, false)
|
||||||
|
|
||||||
|
runOnUiThread {
|
||||||
|
hideKeyboard()
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun duplicateTask() {}
|
private fun duplicateTask() {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user