diff --git a/app/build.gradle b/app/build.gradle index fb97dbe9e..aa63f81e3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -52,7 +52,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.3.15' + implementation 'com.simplemobiletools:commons:5.3.16' implementation 'joda-time:joda-time:2.10.1' implementation 'androidx.multidex:multidex:2.0.0' diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt index 72864e1d8..8e7469a8d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt @@ -765,7 +765,7 @@ class EventActivity : SimpleActivity() { reminder3Minutes = reminder3 repeatInterval = mRepeatInterval 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 repeatRule = mRepeatRule eventType = newEventType diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/models/Event.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/models/Event.kt index 4ec035581..b585e11fd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/models/Event.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/models/Event.kt @@ -7,8 +7,7 @@ import androidx.room.Index import androidx.room.PrimaryKey import com.simplemobiletools.calendar.pro.extensions.seconds import com.simplemobiletools.calendar.pro.helpers.* -import com.simplemobiletools.commons.extensions.addBit -import com.simplemobiletools.commons.extensions.removeBit +import com.simplemobiletools.commons.extensions.addBitIf import org.joda.time.DateTime import java.io.Serializable @@ -157,11 +156,7 @@ data class Event( var isPastEvent: Boolean get() = flags and FLAG_IS_PAST_EVENT != 0 set(isPastEvent) { - flags = if (isPastEvent) { - flags.addBit(FLAG_IS_PAST_EVENT) - } else { - flags.removeBit(FLAG_IS_PAST_EVENT) - } + flags = flags.addBitIf(isPastEvent, FLAG_IS_PAST_EVENT) } var color: Int = 0 diff --git a/build.gradle b/build.gradle index 17a20ee31..1cfbb3a29 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.3.0' + ext.kotlin_version = '1.3.10' repositories { google()