mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
removing the flag_is_repeatable constant
This commit is contained in:
@ -76,7 +76,6 @@ const val REPEAT_ORDER_WEEKDAY = 4 // i.e. every 4th sunday
|
|||||||
// special event flags
|
// special event flags
|
||||||
const val FLAG_ALL_DAY = 1
|
const val FLAG_ALL_DAY = 1
|
||||||
const val FLAG_IS_PAST_EVENT = 2
|
const val FLAG_IS_PAST_EVENT = 2
|
||||||
const val FLAG_IS_REPEATABLE = 4
|
|
||||||
|
|
||||||
// constants related to ICS file exporting / importing
|
// constants related to ICS file exporting / importing
|
||||||
const val BEGIN_CALENDAR = "BEGIN:VCALENDAR"
|
const val BEGIN_CALENDAR = "BEGIN:VCALENDAR"
|
||||||
|
@ -84,7 +84,6 @@ class EventsHelper(val context: Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
event.updateIsEventRepeatable()
|
|
||||||
event.id = eventsDB.insertOrUpdate(event)
|
event.id = eventsDB.insertOrUpdate(event)
|
||||||
|
|
||||||
context.updateWidgets()
|
context.updateWidgets()
|
||||||
@ -104,7 +103,6 @@ class EventsHelper(val context: Context) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
event.updateIsEventRepeatable()
|
|
||||||
event.id = eventsDB.insertOrUpdate(event)
|
event.id = eventsDB.insertOrUpdate(event)
|
||||||
|
|
||||||
context.scheduleNextEventReminder(event)
|
context.scheduleNextEventReminder(event)
|
||||||
@ -118,7 +116,6 @@ class EventsHelper(val context: Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun updateEvent(activity: SimpleActivity? = null, event: Event, updateAtCalDAV: Boolean, callback: (() -> Unit)? = null) {
|
fun updateEvent(activity: SimpleActivity? = null, event: Event, updateAtCalDAV: Boolean, callback: (() -> Unit)? = null) {
|
||||||
event.updateIsEventRepeatable()
|
|
||||||
eventsDB.insertOrUpdate(event)
|
eventsDB.insertOrUpdate(event)
|
||||||
|
|
||||||
context.updateWidgets()
|
context.updateWidgets()
|
||||||
|
@ -151,10 +151,6 @@ data class Event(
|
|||||||
isPastEvent = endTSToCheck < getNowSeconds()
|
isPastEvent = endTSToCheck < getNowSeconds()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun updateIsEventRepeatable() {
|
|
||||||
flags = flags.addBitIf(repeatInterval != 0, FLAG_IS_REPEATABLE)
|
|
||||||
}
|
|
||||||
|
|
||||||
var isPastEvent: Boolean
|
var isPastEvent: Boolean
|
||||||
get() = flags and FLAG_IS_PAST_EVENT != 0
|
get() = flags and FLAG_IS_PAST_EVENT != 0
|
||||||
set(isPastEvent) {
|
set(isPastEvent) {
|
||||||
|
Reference in New Issue
Block a user