Skip to content

Commit d551875

Browse files
committed
wear: use different placeholder symbol
1 parent ae5a9cd commit d551875

15 files changed

+23
-23
lines changed

wearapp/src/main/java/com/thewizrd/simpleweather/wearable/complications/AQIComplicationService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ class AQIComplicationService : BaseWeatherComplicationService() {
144144
}
145145

146146
val aqiModel = aqi?.let { AirQualityViewModel(it) }
147-
val aqiStr = aqiModel?.let { "${it.index}, ${it.level}" } ?: WeatherIcons.PLACEHOLDER
148-
val aqiShortStr = aqiModel?.let { "${it.index}" } ?: WeatherIcons.PLACEHOLDER
147+
val aqiStr = aqiModel?.let { "${it.index}, ${it.level}" } ?: WeatherIcons.EM_DASH
148+
val aqiShortStr = aqiModel?.let { "${it.index}" } ?: WeatherIcons.EM_DASH
149149
val aqiProgress = aqiModel?.progress?.toFloat() ?: 0f
150150
val aqiProgressMax = aqiModel?.let { max(it.progressMax, it.progress).toFloat() } ?: 301f
151151

wearapp/src/main/java/com/thewizrd/simpleweather/wearable/complications/BeaufortComplicationService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ class BeaufortComplicationService : WeatherHourlyForecastComplicationService() {
140140
?: "${getString(R.string.label_beaufort)}: ${getString(R.string.weather_notavailable)}"
141141
).build()
142142

143-
val progressShortStr = beaufortModel?.progress?.toString() ?: WeatherIcons.PLACEHOLDER
143+
val progressShortStr = beaufortModel?.progress?.toString() ?: WeatherIcons.EM_DASH
144144
val progressStr = beaufortModel?.let { "${it.progress}, ${it.beaufort.value}" }
145-
?: WeatherIcons.PLACEHOLDER
145+
?: WeatherIcons.EM_DASH
146146
val beaufortIcon = beaufortModel?.beaufort?.icon ?: WeatherIcons.WIND_BEAUFORT_0
147147

148148
return when (dataType) {

wearapp/src/main/java/com/thewizrd/simpleweather/wearable/complications/CurrentLocationFeelsLikeWeatherComplicationService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class CurrentLocationFeelsLikeWeatherComplicationService : WeatherForecastCompli
127127
)
128128
String.format(LocaleUtils.getLocale(), "%d°", temp)
129129
} else {
130-
WeatherIcons.PLACEHOLDER
130+
WeatherIcons.EM_DASH
131131
}
132132
val feelsLikeLabel = getString(R.string.label_feelslike)
133133

wearapp/src/main/java/com/thewizrd/simpleweather/wearable/complications/DewPointComplicationService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class DewPointComplicationService : WeatherHourlyForecastComplicationService() {
7676

7777
val tempUnit = settingsManager.getTemperatureUnit()
7878
val tempStr = if (dewPointF == null || dewPointC == null || dewPointF == dewPointC) {
79-
WeatherIcons.PLACEHOLDER
79+
WeatherIcons.EM_DASH
8080
} else {
8181
val tempVal =
8282
if (tempUnit == Units.FAHRENHEIT) dewPointF.roundToInt() else dewPointC.toInt()

wearapp/src/main/java/com/thewizrd/simpleweather/wearable/complications/FeelsLikeComplicationService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class FeelsLikeComplicationService : WeatherHourlyForecastComplicationService()
7676

7777
val tempUnit = settingsManager.getTemperatureUnit()
7878
val tempStr = if (feelsLikeF == null || feelsLikeC == null || feelsLikeF == feelsLikeC) {
79-
WeatherIcons.PLACEHOLDER
79+
WeatherIcons.EM_DASH
8080
} else {
8181
val tempVal =
8282
if (tempUnit == Units.FAHRENHEIT) feelsLikeF.roundToInt() else feelsLikeC.toInt()

wearapp/src/main/java/com/thewizrd/simpleweather/wearable/complications/HumidityComplicationService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class HumidityComplicationService : WeatherHourlyForecastComplicationService() {
9292
}
9393

9494
val humidityPct = weather.atmosphere?.humidity ?: hourlyForecast?.extras?.humidity
95-
val humidityStr = humidityPct?.let { "${it}%" } ?: WeatherIcons.PLACEHOLDER
95+
val humidityStr = humidityPct?.let { "${it}%" } ?: WeatherIcons.EM_DASH
9696

9797
return when (dataType) {
9898
ComplicationType.RANGED_VALUE -> {

wearapp/src/main/java/com/thewizrd/simpleweather/wearable/complications/PrecipitationComplicationService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class PrecipitationComplicationService : WeatherHourlyForecastComplicationServic
8989
}
9090

9191
val popChance = weather.precipitation?.pop ?: hourlyForecast?.extras?.pop
92-
val popChanceStr = popChance?.let { "${it}%" } ?: WeatherIcons.PLACEHOLDER
92+
val popChanceStr = popChance?.let { "${it}%" } ?: WeatherIcons.EM_DASH
9393

9494
return when (dataType) {
9595
ComplicationType.RANGED_VALUE -> {

wearapp/src/main/java/com/thewizrd/simpleweather/wearable/complications/PressureComplicationService.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class PressureComplicationService : WeatherHourlyForecastComplicationService() {
164164
.setTint(Colors.WHITESMOKE)
165165
).build()
166166
).setText(
167-
PlainComplicationText.Builder(pressureStrShort ?: WeatherIcons.PLACEHOLDER)
167+
PlainComplicationText.Builder(pressureStrShort ?: WeatherIcons.EM_DASH)
168168
.build()
169169
).setTapAction(
170170
getTapIntent(this)
@@ -173,7 +173,7 @@ class PressureComplicationService : WeatherHourlyForecastComplicationService() {
173173

174174
ComplicationType.SHORT_TEXT -> {
175175
ShortTextComplicationData.Builder(
176-
PlainComplicationText.Builder(pressureStrShort ?: WeatherIcons.PLACEHOLDER)
176+
PlainComplicationText.Builder(pressureStrShort ?: WeatherIcons.EM_DASH)
177177
.build(),
178178
PlainComplicationText.Builder(
179179
String.format(
@@ -203,7 +203,7 @@ class PressureComplicationService : WeatherHourlyForecastComplicationService() {
203203
)
204204
).build()
205205
).setTitle(
206-
PlainComplicationText.Builder(pressureStr ?: WeatherIcons.PLACEHOLDER).build()
206+
PlainComplicationText.Builder(pressureStr ?: WeatherIcons.EM_DASH).build()
207207
).setMonochromaticImage(
208208
MonochromaticImage.Builder(
209209
Icon.createWithResource(this, complicationIconResId)

wearapp/src/main/java/com/thewizrd/simpleweather/wearable/complications/SunriseSunsetComplicationService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class SunriseSunsetComplicationService : WeatherHourlyForecastComplicationServic
109109
complicationIconResId = R.drawable.wi_sunset
110110
desc = getString(R.string.label_sunset)
111111
} else {
112-
text = sunrise?.format(fmt) ?: WeatherIcons.PLACEHOLDER
112+
text = sunrise?.format(fmt) ?: WeatherIcons.EM_DASH
113113
complicationIconResId = R.drawable.wi_sunrise
114114
desc = getString(R.string.label_sunrise)
115115
}

wearapp/src/main/java/com/thewizrd/simpleweather/wearable/complications/UVComplicationService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ class UVComplicationService : WeatherHourlyForecastComplicationService() {
9696
val uvIndex = weather.condition?.uv?.index ?: hourlyForecast?.extras?.uvIndex
9797
val uvModel = uvIndex?.let { UVIndexViewModel(UV(it)) }
9898
val uvStr =
99-
uvModel?.let { "${uvModel.index}, ${uvModel.description}" } ?: WeatherIcons.PLACEHOLDER
100-
val uvIdxStr = uvModel?.index?.toString() ?: WeatherIcons.PLACEHOLDER
99+
uvModel?.let { "${uvModel.index}, ${uvModel.description}" } ?: WeatherIcons.EM_DASH
100+
val uvIdxStr = uvModel?.index?.toString() ?: WeatherIcons.EM_DASH
101101
val uvProgress = uvModel?.progress?.toFloat() ?: 0f
102102
val uvProgressMax = uvModel?.let { max(it.progressMax, it.progress).toFloat() } ?: 11f
103103
val contentDescription = "${getString(R.string.label_uv)}: $uvStr"

0 commit comments

Comments
 (0)