Skip to content

Commit

Permalink
Merge pull request #585 from CCExtractor/features
Browse files Browse the repository at this point in the history
gradle upgrade 7.4.2
  • Loading branch information
AryanSarafDev authored Aug 17, 2024
2 parents 73388af + 3660098 commit aa12180
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ android {
applicationId "com.ccextractor.ultimate_alarm_clock"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 23
minSdkVersion 24
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,68 +41,68 @@ fun getLatestAlarm(db: SQLiteDatabase, wantNextAlarm: Boolean, profile: String):
var alarm = AlarmModel.fromCursor(cursor)
var intervaltoAlarm = Long.MAX_VALUE
var setAlarm: AlarmModel? =null
do {
alarm = AlarmModel.fromCursor(cursor)
if (alarm.ringOn == 0) {
do {
alarm = AlarmModel.fromCursor(cursor)
if (alarm.ringOn == 0) {

var dayfromToday = 0
var timeDif = getTimeDifferenceInMillis(alarm.alarmTime)
Log.d("d","timeDiff ${timeDif}")

if ((alarm.days[currentDay] == '1' || alarm.days=="0000000") && timeDif > -1L) {
if (timeDif < intervaltoAlarm) {
intervaltoAlarm = timeDif
setAlarm = alarm
}
} else {
dayfromToday = getDaysUntilNextAlarm(alarm.days, currentDay)
if (dayfromToday == 0) {

if(alarm.days=="0000000")
{
var dayfromToday = 0
var timeDif = getTimeDifferenceInMillis(alarm.alarmTime)
Log.d("d","timeDiff ${timeDif}")

if ((alarm.days[currentDay] == '1' || alarm.days=="0000000") && timeDif > -1L) {
if (timeDif < intervaltoAlarm) {
intervaltoAlarm = timeDif
setAlarm = alarm
}
} else {
dayfromToday = getDaysUntilNextAlarm(alarm.days, currentDay)
if (dayfromToday == 0) {

if(alarm.days=="0000000")
{

var timeDif =
getTimeDifferenceFromMidnight(alarm.alarmTime) + getMillisecondsUntilMidnight()
if (timeDif < intervaltoAlarm && timeDif > -1L ) {
intervaltoAlarm = timeDif
setAlarm = alarm
}
}
else{

var timeDif =
getTimeDifferenceFromMidnight(alarm.alarmTime) + getMillisecondsUntilMidnight() + 86400000 * 6
if (timeDif < intervaltoAlarm && timeDif > -1L ) {
intervaltoAlarm = timeDif
setAlarm = alarm
}
}
} else if (dayfromToday == 1) {
var timeDif =
getTimeDifferenceFromMidnight(alarm.alarmTime) + getMillisecondsUntilMidnight()
if (timeDif < intervaltoAlarm && timeDif > -1L ) {
Log.d("d","timeDiff ${timeDif}")

if (timeDif < intervaltoAlarm && timeDif > -1L) {
intervaltoAlarm = timeDif
setAlarm = alarm
}
}
else{

} else {
var timeDif =
getTimeDifferenceFromMidnight(alarm.alarmTime) + getMillisecondsUntilMidnight() + 86400000 * 6
if (timeDif < intervaltoAlarm && timeDif > -1L ) {
getTimeDifferenceFromMidnight(alarm.alarmTime) + getMillisecondsUntilMidnight() + 86400000 * (dayfromToday - 1)
if (timeDif < intervaltoAlarm && timeDif > -1L) {
intervaltoAlarm = timeDif
setAlarm = alarm
}
}
} else if (dayfromToday == 1) {
var timeDif =
getTimeDifferenceFromMidnight(alarm.alarmTime) + getMillisecondsUntilMidnight()
Log.d("d","timeDiff ${timeDif}")

if (timeDif < intervaltoAlarm && timeDif > -1L) {
intervaltoAlarm = timeDif
setAlarm = alarm
}
} else {
var timeDif =
getTimeDifferenceFromMidnight(alarm.alarmTime) + getMillisecondsUntilMidnight() + 86400000 * (dayfromToday - 1)
if (timeDif < intervaltoAlarm && timeDif > -1L) {
intervaltoAlarm = timeDif
setAlarm = alarm
}
}

}
} else {
val dayfromToday = getDaysFromCurrentDate(alarm.alarmDate)
if (dayfromToday == 0L) {
var timeDif = getTimeDifferenceInMillis(alarm.alarmTime)
if (alarm.days[currentDay] == '1' && timeDif > -1L) {
if (timeDif < intervaltoAlarm) {
intervaltoAlarm = timeDif
}
} else {
val dayfromToday = getDaysFromCurrentDate(alarm.alarmDate)
if (dayfromToday == 0L) {
var timeDif = getTimeDifferenceInMillis(alarm.alarmTime)
if (alarm.days[currentDay] == '1' && timeDif > -1L) {
if (timeDif < intervaltoAlarm) {
intervaltoAlarm = timeDif
setAlarm = alarm
}
}
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.15'
}
Expand Down

0 comments on commit aa12180

Please sign in to comment.