Skip to content

Commit 8a69de6

Browse files
authored
Merge pull request #25 from noxasch/fix/android-update-widget-call-multiple-time
fix(android): call widget update only once
2 parents eaa067d + 3d5477f commit 8a69de6

File tree

8 files changed

+19
-15
lines changed

8 files changed

+19
-15
lines changed

app_widget/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.3.1
2+
* fix(android): fix trigger update widget updating the widget multiple time
3+
14
## 0.3.0
25
* feat(android): support widget provider with diff androidPackageName
36
* test: update widget test

app_widget/example/integration_test/android_test_diff_package.dart renamed to app_widget/example/integration_test/android_diff_package_name_test.dart

File renamed without changes.

app_widget/example/pubspec.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@ packages:
77
path: ".."
88
relative: true
99
source: path
10-
version: "0.3.0"
10+
version: "0.3.1"
1111
app_widget_android:
1212
dependency: transitive
1313
description:
1414
name: app_widget_android
15-
sha256: "10985e55599231d694ab073c0677f5707cf1464579990648630133ad04643e27"
15+
sha256: "9b5fc286e3f4add2404468035effbd584935e31b064b36228623f7b12678b77b"
1616
url: "https://pub.dev"
1717
source: hosted
18-
version: "0.3.1"
18+
version: "0.3.3"
1919
app_widget_platform_interface:
2020
dependency: transitive
2121
description:
2222
name: app_widget_platform_interface
23-
sha256: fcfaaf47627cb4cc28a7dad4cceb692c5b9d7ec3e18fbeee07c178b0fcb9461e
23+
sha256: "07c7500e83f86703fdad1aa3480e492a7226b322cbad3e71910f2630df96391e"
2424
url: "https://pub.dev"
2525
source: hosted
26-
version: "0.3.0"
26+
version: "0.3.1"
2727
async:
2828
dependency: transitive
2929
description:

app_widget/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: app_widget
22
description: Flutter plugin to manage app widget / home screen widget from within flutter app.
3-
version: 0.3.0
3+
version: 0.3.1
44
homepage: https://noxasch.tech/
55
repository: https://github.com/noxasch/flutter_app_widget/tree/master/app_widget
66
issue_tracker: https://github.com/noxasch/flutter_app_widget/issues
@@ -14,7 +14,7 @@ dependencies:
1414
sdk: flutter
1515
plugin_platform_interface: ^2.1.7
1616
app_widget_platform_interface: ^0.3.1
17-
app_widget_android: ^0.3.2
17+
app_widget_android: ^0.3.3
1818
# app_widget_platform_interface: # local dev
1919
# path: ../app_widget_platform_interface
2020
# app_widget_android: # local dev

app_widget_android/CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
2+
## 0.3.3
3+
* fix: fix trigger update widget updating the widget multiple time
4+
15
## 0.3.2
26

3-
*chore: update latest dependencies
7+
* chore: update latest dependencies
48

59
## 0.3.1
610

7-
*chore: use latest platform interface
11+
* chore: use latest platform interface
812
## 0.3.0
913

1014
*feat: support widget provider with different package name

app_widget_android/android/src/main/kotlin/tech/noxasch/app_widget/AppWidgetMethodCallHandler.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ class AppWidgetMethodCallHandler(private val context: Context, )
129129
setOnClickPendingIntent(textViewId, pendingIntent)
130130
}
131131
}
132-
133132
appWidgetManager.updateAppWidget(widgetId, views)
134133
}
135134

@@ -185,12 +184,10 @@ class AppWidgetMethodCallHandler(private val context: Context, )
185184

186185
// only work if widget is blank - so we have to clear it first
187186
views.setTextViewText(textViewId, "")
188-
appWidgetManager.partiallyUpdateAppWidget(widgetId, views)
189187
views.setTextViewText(textViewId, value)
190-
appWidgetManager.partiallyUpdateAppWidget(widgetId, views)
191188
views.setOnClickPendingIntent(textViewId, pendingIntent)
192-
appWidgetManager.partiallyUpdateAppWidget(widgetId, views)
193189
}
190+
appWidgetManager.partiallyUpdateAppWidget(widgetId, views)
194191
}
195192

196193
result.success(true)

app_widget_android/example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
path: ".."
88
relative: true
99
source: path
10-
version: "0.3.2"
10+
version: "0.3.3"
1111
app_widget_platform_interface:
1212
dependency: transitive
1313
description:

app_widget_android/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: app_widget_android
22
description: Android implementation for app_widget plugin
3-
version: 0.3.2
3+
version: 0.3.3
44
homepage: https://noxasch.tech/
55
repository: https://github.com/noxasch/flutter_app_widget/tree/master/app_widget_android
66
issue_tracker: https://github.com/noxasch/flutter_app_widget/issues

0 commit comments

Comments
 (0)