mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-17 04:10:45 +01:00
update the widget after edits done from EventActivity
This commit is contained in:
parent
a8cffc36b1
commit
611b93aa12
@ -14,6 +14,7 @@ import android.view.inputmethod.InputMethodManager
|
|||||||
import android.widget.AdapterView
|
import android.widget.AdapterView
|
||||||
import android.widget.EditText
|
import android.widget.EditText
|
||||||
import com.simplemobiletools.calendar.*
|
import com.simplemobiletools.calendar.*
|
||||||
|
import com.simplemobiletools.calendar.extensions.updateWidget
|
||||||
import com.simplemobiletools.calendar.fragments.DayFragment
|
import com.simplemobiletools.calendar.fragments.DayFragment
|
||||||
import com.simplemobiletools.calendar.models.Event
|
import com.simplemobiletools.calendar.models.Event
|
||||||
import kotlinx.android.synthetic.main.activity_event.*
|
import kotlinx.android.synthetic.main.activity_event.*
|
||||||
@ -317,17 +318,19 @@ class EventActivity : SimpleActivity(), DBHelper.DBOperationsListener {
|
|||||||
Utils.showToast(applicationContext, R.string.event_added)
|
Utils.showToast(applicationContext, R.string.event_added)
|
||||||
}
|
}
|
||||||
Utils.scheduleNotification(applicationContext, event)
|
Utils.scheduleNotification(applicationContext, event)
|
||||||
|
updateWidget()
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun eventUpdated(event: Event) {
|
override fun eventUpdated(event: Event) {
|
||||||
Utils.scheduleNotification(applicationContext, event)
|
Utils.scheduleNotification(applicationContext, event)
|
||||||
Utils.showToast(applicationContext, R.string.event_updated)
|
Utils.showToast(applicationContext, R.string.event_updated)
|
||||||
|
updateWidget()
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun eventsDeleted(cnt: Int) {
|
override fun eventsDeleted(cnt: Int) {
|
||||||
|
updateWidget()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun gotEvents(events: MutableList<Event>) {
|
override fun gotEvents(events: MutableList<Event>) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user