diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 7767f9e52..e3adb04da 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -96,6 +96,34 @@
android:name="android.appwidget.provider"
android:resource="@xml/summary_widget_info" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/data/worker/widgets/WidgetWeatherUpdater.kt b/app/src/main/java/com/pranshulgg/weather_master_app/data/worker/widgets/WidgetWeatherUpdater.kt
index f4d3db11a..284192e75 100644
--- a/app/src/main/java/com/pranshulgg/weather_master_app/data/worker/widgets/WidgetWeatherUpdater.kt
+++ b/app/src/main/java/com/pranshulgg/weather_master_app/data/worker/widgets/WidgetWeatherUpdater.kt
@@ -8,6 +8,10 @@ import com.pranshulgg.weather_master_app.widgets.WeatherWidgetStateJson
import com.pranshulgg.weather_master_app.widgets.pill.WidgetPill
import com.pranshulgg.weather_master_app.widgets.summary.SummaryWidget
import com.pranshulgg.weather_master_app.widgets.weather.WeatherWidget
+import com.pranshulgg.weather_master_app.widgets.weatherhorizontal.WeatherHorizontalWidget
+import com.pranshulgg.weather_master_app.widgets.weatherhorizontal.ui.WeatherWidgetHorizontal
+import com.pranshulgg.weather_master_app.widgets.weathersmall.WeatherSmallWidget
+import com.pranshulgg.weather_master_app.widgets.weathersmall.ui.WeatherWidgetSmall
class WeatherWidgetUpdater(
private val context: Context
@@ -16,6 +20,9 @@ class WeatherWidgetUpdater(
private val widget = WeatherWidget()
private val pill = WidgetPill()
private val summary = SummaryWidget()
+ private val widgetSmall = WeatherSmallWidget()
+
+ private val widgetHorizontal = WeatherHorizontalWidget()
suspend fun update(json: String) {
@@ -25,6 +32,8 @@ class WeatherWidgetUpdater(
val widgetIds = manager.getGlanceIds(WeatherWidget::class.java)
val pillIds = manager.getGlanceIds(WidgetPill::class.java)
val summaryIds = manager.getGlanceIds(SummaryWidget::class.java)
+ val widgetSmallIds = manager.getGlanceIds(WeatherSmallWidget::class.java)
+ val widgetHorizontalIds = manager.getGlanceIds(WeatherHorizontalWidget::class.java)
widgetIds.forEach {
updateAppWidgetState(context, WeatherWidgetStateDefinition, it) {
@@ -46,5 +55,19 @@ class WeatherWidgetUpdater(
}
summary.update(context, it)
}
+
+ widgetSmallIds.forEach {
+ updateAppWidgetState(context, WeatherWidgetStateDefinition, it) {
+ WeatherWidgetStateJson(json)
+ }
+ widgetSmall.update(context, it)
+ }
+
+ widgetHorizontalIds.forEach {
+ updateAppWidgetState(context, WeatherWidgetStateDefinition, it) {
+ WeatherWidgetStateJson(json)
+ }
+ widgetHorizontal.update(context, it)
+ }
}
}
\ No newline at end of file