Skip to content

Commit

Permalink
next release
Browse files Browse the repository at this point in the history
  • Loading branch information
ManApart committed Feb 20, 2022
1 parent 57ef25d commit e7f0314
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/rak/pixellwp/cycling/TimelineBlender.kt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class TimelineBlender(defaultPalette: Map.Entry<Int, Palette>) {
}
lastPercent = percent

Log.d(logTag, "Blending palettes for ${previous.key} (${getTimeString(previous.key)}) and ${next.key} (${getTimeString(next.key)}) with current time $currentTime (${getTimeString(currentTime)}) and percent blend $percent")
Log.d(logTag, "Blending palettes for ${previous.key} and ${next.key} with current time $currentTime and percent blend $percent")
return current.blendPalette(previous.value, next.value, percent)
}

Expand Down
10 changes: 0 additions & 10 deletions app/src/main/java/rak/pixellwp/cycling/models/DaySeconds.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,6 @@ class DaySeconds {

}

fun getTimeString(time: Int): String {
return getTimeString(getMilliFromSeconds(time))
}

fun getTimeString(time: Long): String {
val cal = DaySeconds()
cal.setTime(time)
return cal.get24HourFormattedString()
}

private fun getSecondsFromMilli(milli: Long): Int {
return (milli / 1000).toInt()
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/rak/pixellwp/cycling/models/Timeline.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Timeline(entries: Map<String, String>, palettes: List<Palette>) {
private val blender = TimelineBlender(timeToPalette.entries.first())

init {
Log.d(logTag, "Initing timeline image with palettes at " + timeToPalette.keys.sorted().map { time -> "$time (${getTimeString(time)})" }.toList())
Log.d(logTag, "Initing timeline image with palettes at " + timeToPalette.keys.sorted().map { time -> "$time" }.toList())
}

private fun parseEntries(entries: Map<String, String>, palettes: List<Palette>): Map<Int, Palette> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fun CyclingWallpaperService.CyclingWallpaperEngine.panDetector(applicationContex
if (adjustMode || currentImageType != ImageType.TIMELINE) {
adjustImageSrc(distanceX, distanceY)
} else {
val distance = if (abs(distanceX) > abs(distanceY)) distanceX else -distanceY
val distance = if (abs(distanceX) > abs(distanceY)) -distanceX else distanceY
adjustTimeOverride(distance)
}
return super.onScroll(e1, e2, distanceX, distanceY)
Expand Down

0 comments on commit e7f0314

Please sign in to comment.