From d67b8fd054103a36704d4888fda8a5a5e491628c Mon Sep 17 00:00:00 2001
From: amoledwatchfaces <92080649+amoledwatchfaces@users.noreply.github.com>
Date: Thu, 10 Oct 2024 17:25:33 +0000
Subject: [PATCH] * reverted dual sunset sunrise support
---
.idea/appInsightsSettings.xml | 5 -----
.idea/gradle.xml | 1 -
build.gradle.kts | 6 +++---
wear/build.gradle.kts | 2 +-
.../complication/SunriseSunsetComplicationService.kt | 12 +++++-------
5 files changed, 9 insertions(+), 17 deletions(-)
diff --git a/.idea/appInsightsSettings.xml b/.idea/appInsightsSettings.xml
index f472e84..4a5fc2e 100644
--- a/.idea/appInsightsSettings.xml
+++ b/.idea/appInsightsSettings.xml
@@ -12,11 +12,6 @@
-
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 18f3847..6d4cc03 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -4,7 +4,6 @@
-
diff --git a/build.gradle.kts b/build.gradle.kts
index d857796..5812b6d 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -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 {
diff --git a/wear/build.gradle.kts b/wear/build.gradle.kts
index 0dfc776..e5aa011 100644
--- a/wear/build.gradle.kts
+++ b/wear/build.gradle.kts
@@ -72,7 +72,7 @@ android {
}
dependencies {
- val composeUiVersion = "1.7.2"
+ val composeUiVersion = "1.7.3"
val composeWearVersion = "1.4.0"
//request permission
diff --git a/wear/src/main/kotlin/com/weartools/weekdayutccomp/complication/SunriseSunsetComplicationService.kt b/wear/src/main/kotlin/com/weartools/weekdayutccomp/complication/SunriseSunsetComplicationService.kt
index 35de03d..587acb2 100644
--- a/wear/src/main/kotlin/com/weartools/weekdayutccomp/complication/SunriseSunsetComplicationService.kt
+++ b/wear/src/main/kotlin/com/weartools/weekdayutccomp/complication/SunriseSunsetComplicationService.kt
@@ -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()
}