Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecorry31 committed Mar 10, 2022
1 parent ca70f2f commit 91747a9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 21 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ dependencies {
implementation("com.github.kylecorry31:subsampling-scale-image-view:v3.10.0")

// Sol
implementation("com.github.kylecorry31:sol:5.8.0-beta01")
implementation("com.github.kylecorry31:sol:5.8.0")

// Andromeda
val andromedaVersion = "2.8.0-beta04"
val andromedaVersion = "2.8.0"
implementation("com.github.kylecorry31.andromeda:core:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:fragments:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:forms:$andromedaVersion")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package com.kylecorry.trail_sense.astronomy.ui
import com.github.mikephil.charting.charts.LineChart
import com.kylecorry.andromeda.core.units.PixelCoordinate
import com.kylecorry.sol.time.Time
import com.kylecorry.sol.time.Time.hoursUntil
import com.kylecorry.sol.time.Time.toZonedDateTime
import com.kylecorry.sol.units.Reading
import com.kylecorry.trail_sense.R
import com.kylecorry.trail_sense.shared.FormatService
import com.kylecorry.trail_sense.shared.extensions.hoursUntil
import com.kylecorry.trail_sense.shared.views.SimpleLineChart
import java.time.Instant
import java.time.LocalTime
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
package com.kylecorry.trail_sense.shared.extensions

import com.kylecorry.sol.time.Time.atEndOfDay
import com.kylecorry.sol.units.Reading
import java.time.*

fun ZonedDateTime.roundNearestMinute(minutes: Long): ZonedDateTime {
val minute = this.minute
val newMinute = (minute / minutes) * minutes

val diff = newMinute - minute
return this.plusMinutes(diff)
}

fun Instant.hoursUntil(other: Instant): Float {
return Duration.between(this, other).seconds / (60f * 60f)
}

fun LocalDate.atEndOfDay(): LocalDateTime {
return atTime(LocalTime.MAX)
}
import java.time.Duration
import java.time.LocalDate
import java.time.ZoneId
import java.time.ZonedDateTime

fun <T> getReadings(
date: LocalDate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import com.kylecorry.andromeda.core.units.PixelCoordinate
import com.kylecorry.sol.math.Range
import com.kylecorry.sol.math.SolMath.norm
import com.kylecorry.sol.time.Time
import com.kylecorry.sol.time.Time.hoursUntil
import com.kylecorry.sol.time.Time.toZonedDateTime
import com.kylecorry.sol.units.Reading
import com.kylecorry.trail_sense.R
import com.kylecorry.trail_sense.shared.FormatService
import com.kylecorry.trail_sense.shared.colors.AppColor
import com.kylecorry.trail_sense.shared.extensions.hoursUntil
import com.kylecorry.trail_sense.shared.views.SimpleLineChart
import java.time.Instant
import java.time.LocalTime
Expand Down

0 comments on commit 91747a9

Please sign in to comment.