Skip to content

Commit

Permalink
Merge pull request #25 from noxasch/fix/android-update-widget-call-mu…
Browse files Browse the repository at this point in the history
…ltiple-time

fix(android): call widget update only once
  • Loading branch information
noxasch committed Apr 26, 2024
2 parents eaa067d + 3d5477f commit 8a69de6
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 15 deletions.
3 changes: 3 additions & 0 deletions app_widget/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.3.1
* fix(android): fix trigger update widget updating the widget multiple time

## 0.3.0
* feat(android): support widget provider with diff androidPackageName
* test: update widget test
Expand Down
10 changes: 5 additions & 5 deletions app_widget/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ packages:
path: ".."
relative: true
source: path
version: "0.3.0"
version: "0.3.1"
app_widget_android:
dependency: transitive
description:
name: app_widget_android
sha256: "10985e55599231d694ab073c0677f5707cf1464579990648630133ad04643e27"
sha256: "9b5fc286e3f4add2404468035effbd584935e31b064b36228623f7b12678b77b"
url: "https://pub.dev"
source: hosted
version: "0.3.1"
version: "0.3.3"
app_widget_platform_interface:
dependency: transitive
description:
name: app_widget_platform_interface
sha256: fcfaaf47627cb4cc28a7dad4cceb692c5b9d7ec3e18fbeee07c178b0fcb9461e
sha256: "07c7500e83f86703fdad1aa3480e492a7226b322cbad3e71910f2630df96391e"
url: "https://pub.dev"
source: hosted
version: "0.3.0"
version: "0.3.1"
async:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions app_widget/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: app_widget
description: Flutter plugin to manage app widget / home screen widget from within flutter app.
version: 0.3.0
version: 0.3.1
homepage: https://noxasch.tech/
repository: https://github.com/noxasch/flutter_app_widget/tree/master/app_widget
issue_tracker: https://github.com/noxasch/flutter_app_widget/issues
Expand All @@ -14,7 +14,7 @@ dependencies:
sdk: flutter
plugin_platform_interface: ^2.1.7
app_widget_platform_interface: ^0.3.1
app_widget_android: ^0.3.2
app_widget_android: ^0.3.3
# app_widget_platform_interface: # local dev
# path: ../app_widget_platform_interface
# app_widget_android: # local dev
Expand Down
8 changes: 6 additions & 2 deletions app_widget_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@

## 0.3.3
* fix: fix trigger update widget updating the widget multiple time

## 0.3.2

*chore: update latest dependencies
* chore: update latest dependencies

## 0.3.1

*chore: use latest platform interface
* chore: use latest platform interface
## 0.3.0

*feat: support widget provider with different package name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ class AppWidgetMethodCallHandler(private val context: Context, )
setOnClickPendingIntent(textViewId, pendingIntent)
}
}

appWidgetManager.updateAppWidget(widgetId, views)
}

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

// only work if widget is blank - so we have to clear it first
views.setTextViewText(textViewId, "")
appWidgetManager.partiallyUpdateAppWidget(widgetId, views)
views.setTextViewText(textViewId, value)
appWidgetManager.partiallyUpdateAppWidget(widgetId, views)
views.setOnClickPendingIntent(textViewId, pendingIntent)
appWidgetManager.partiallyUpdateAppWidget(widgetId, views)
}
appWidgetManager.partiallyUpdateAppWidget(widgetId, views)
}

result.success(true)
Expand Down
2 changes: 1 addition & 1 deletion app_widget_android/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.3.2"
version: "0.3.3"
app_widget_platform_interface:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion app_widget_android/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: app_widget_android
description: Android implementation for app_widget plugin
version: 0.3.2
version: 0.3.3
homepage: https://noxasch.tech/
repository: https://github.com/noxasch/flutter_app_widget/tree/master/app_widget_android
issue_tracker: https://github.com/noxasch/flutter_app_widget/issues
Expand Down

0 comments on commit 8a69de6

Please sign in to comment.