mirror of
https://github.com/PranshulGG/WeatherMaster.git
synced 2026-10-21 10:40:23 -05:00
update widget labels, add Weather 4 widget receiver, and use AppException in SmhiRepository
This commit is contained in:
1 parent
96735101ab
commit
f73101a69e
2 files changed
+22
-7
No files matched your search
@@ -63,7 +63,7 @@
|
||||
<!--WIDGETS-->
|
||||
<receiver
|
||||
android:name=".widgets.weather.WeatherWidgetReceiver"
|
||||
android:label="WM1"
|
||||
android:label="Weather 1"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<receiver
|
||||
android:name=".widgets.pill.WidgetPillReceiver"
|
||||
android:label="WM2"
|
||||
android:label="Pill"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
@@ -91,7 +91,7 @@
|
||||
|
||||
<receiver
|
||||
android:name=".widgets.summary.SummaryWidgetReceiver"
|
||||
android:label="WM3"
|
||||
android:label="Day Summary"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
@@ -105,7 +105,7 @@
|
||||
|
||||
<receiver
|
||||
android:name=".widgets.weatherhorizontal.WeatherHorizontalWidgetReceiver"
|
||||
android:label="WM4"
|
||||
android:label="Weather 2"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
<receiver
|
||||
android:name=".widgets.glance.GlanceWidgetReceiver"
|
||||
android:label="WM5"
|
||||
android:label="Glance"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
<receiver
|
||||
android:name=".widgets.weatherclockdaily.ClockDailyWidgetReceiver"
|
||||
android:label="WM6"
|
||||
android:label="Weather 3"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
@@ -144,6 +144,20 @@
|
||||
android:name="android.appwidget.provider"
|
||||
android:resource="@xml/clock_daily_widget_info" />
|
||||
</receiver>
|
||||
|
||||
<receiver
|
||||
android:name=".widgets.weather4.Weather4WidgerReceiver"
|
||||
android:label="Weather 4"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.appwidget.provider"
|
||||
android:resource="@xml/weather4_widget_info" />
|
||||
</receiver>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
package com.pranshulgg.weather_master_app.core.network.sources.weather.smhi
|
||||
|
||||
import com.pranshulgg.weather_master_app.core.model.domain.AppException
|
||||
import com.pranshulgg.weather_master_app.core.model.domain.location.Location
|
||||
import com.pranshulgg.weather_master_app.core.model.weather.WeatherResult
|
||||
import com.pranshulgg.weather_master_app.core.model.weather.WeatherResultType
|
||||
@@ -48,7 +49,7 @@ class SmhiRepository @Inject constructor(
|
||||
|
||||
val body =
|
||||
response.body()
|
||||
?: return@withContext WeatherResult.Error(exception = UnknownHostException())
|
||||
?: return@withContext WeatherResult.Error(exception = AppException.Unknown())
|
||||
|
||||
|
||||
val domain = body.toDomain(location)
|
||||
|
||||
Reference in new issue
Block a user