Skip to content

Commit

Permalink
* reverted dual sunset sunrise support
Browse files Browse the repository at this point in the history
  • Loading branch information
amoledwatchfaces committed Oct 10, 2024
1 parent 31db036 commit d67b8fd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 17 deletions.
5 changes: 0 additions & 5 deletions .idea/appInsightsSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ tasks.register("clean", Delete::class) {
buildscript {

/** Set version for wear & mobile modules **/
val versionCode by extra(10000363)
val versionName by extra("3.6.3")
val versionCode by extra(10000364)
val versionName by extra("3.6.4")

dependencies {
classpath ("com.android.tools.build:gradle:8.7.0")
classpath ("com.android.tools.build:gradle:8.6.1")
classpath ("org.jetbrains.kotlin:kotlin-serialization:2.0.0")
}
repositories {
Expand Down
2 changes: 1 addition & 1 deletion wear/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ android {
}

dependencies {
val composeUiVersion = "1.7.2"
val composeUiVersion = "1.7.3"
val composeWearVersion = "1.4.0"

//request permission
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,14 @@ class SunriseSunsetComplicationService : SuspendingComplicationDataSourceService
.build()
}
ComplicationType.LONG_TEXT -> {
/** Dual Solution
* @param ambientImage: Inverted Icon, Sunset when Sunrise, Sunrise when Sunset
* @param time2: Next Sunrise/Sunset after time1.
* **/
val time2 = Instant.ofEpochMilli(mph.changeTime2).atZone(ZoneId.systemDefault()).format(dateTimeFormatter)

//val time2 = Instant.ofEpochMilli(mph.changeTime2).atZone(ZoneId.systemDefault()).format(dateTimeFormatter)

LongTextComplicationData.Builder(
text = PlainComplicationText.Builder(text = "$time /.. $time2").build(),
text = PlainComplicationText.Builder(text = text).build(),
contentDescription = PlainComplicationText.Builder(text = "$text: $time").build())
.setMonochromaticImage(MonochromaticImage.Builder(createWithResource(this, icon)).setAmbientImage(createWithResource(this, if (mph.isSunrise) drawable.ic_sunset_3 else drawable.ic_sunrise_3)).build())
.setMonochromaticImage(MonochromaticImage.Builder(createWithResource(this, icon)).build())
.setTitle(PlainComplicationText.Builder(text = time).build())
.setTapAction(openScreen(true))
.build()
}
Expand Down

0 comments on commit d67b8fd

Please sign in to comment.