mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
adding a helper function for setting integer bits
This commit is contained in:
@@ -52,7 +52,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.3.15'
|
implementation 'com.simplemobiletools:commons:5.3.16'
|
||||||
implementation 'joda-time:joda-time:2.10.1'
|
implementation 'joda-time:joda-time:2.10.1'
|
||||||
implementation 'androidx.multidex:multidex:2.0.0'
|
implementation 'androidx.multidex:multidex:2.0.0'
|
||||||
|
|
||||||
|
@@ -765,7 +765,7 @@ class EventActivity : SimpleActivity() {
|
|||||||
reminder3Minutes = reminder3
|
reminder3Minutes = reminder3
|
||||||
repeatInterval = mRepeatInterval
|
repeatInterval = mRepeatInterval
|
||||||
importId = newImportId
|
importId = newImportId
|
||||||
flags = if (event_all_day.isChecked) (mEvent.flags.addBit(FLAG_ALL_DAY)) else (mEvent.flags.removeBit(FLAG_ALL_DAY))
|
flags = mEvent.flags.addBitIf(event_all_day.isChecked, FLAG_ALL_DAY)
|
||||||
repeatLimit = if (repeatInterval == 0) 0 else mRepeatLimit
|
repeatLimit = if (repeatInterval == 0) 0 else mRepeatLimit
|
||||||
repeatRule = mRepeatRule
|
repeatRule = mRepeatRule
|
||||||
eventType = newEventType
|
eventType = newEventType
|
||||||
|
@@ -7,8 +7,7 @@ import androidx.room.Index
|
|||||||
import androidx.room.PrimaryKey
|
import androidx.room.PrimaryKey
|
||||||
import com.simplemobiletools.calendar.pro.extensions.seconds
|
import com.simplemobiletools.calendar.pro.extensions.seconds
|
||||||
import com.simplemobiletools.calendar.pro.helpers.*
|
import com.simplemobiletools.calendar.pro.helpers.*
|
||||||
import com.simplemobiletools.commons.extensions.addBit
|
import com.simplemobiletools.commons.extensions.addBitIf
|
||||||
import com.simplemobiletools.commons.extensions.removeBit
|
|
||||||
import org.joda.time.DateTime
|
import org.joda.time.DateTime
|
||||||
import java.io.Serializable
|
import java.io.Serializable
|
||||||
|
|
||||||
@@ -157,11 +156,7 @@ data class Event(
|
|||||||
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) {
|
||||||
flags = if (isPastEvent) {
|
flags = flags.addBitIf(isPastEvent, FLAG_IS_PAST_EVENT)
|
||||||
flags.addBit(FLAG_IS_PAST_EVENT)
|
|
||||||
} else {
|
|
||||||
flags.removeBit(FLAG_IS_PAST_EVENT)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var color: Int = 0
|
var color: Int = 0
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.3.0'
|
ext.kotlin_version = '1.3.10'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
|
Reference in New Issue
Block a user