From 3f5a53e071be3686d1d459164f437a1669cf4aa3 Mon Sep 17 00:00:00 2001 From: sgong-pdftron Date: Mon, 27 May 2024 09:50:41 -0700 Subject: [PATCH] [Android] Fix custom toolbar item press ID (#323) * Passing back item key correctly * changelog * Updating package version --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 3 +++ .../java/com/pdftron/pdftronflutter/helpers/PluginUtils.java | 2 +- pubspec.yaml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3576d029..908cdd4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 1.0.0-31 - May 27, 2024 +- Fix bug in `startAnnotationToolbarItemPressedListener` + # 1.0.0-30 - May 1, 2024 - Update Android to v10.9.0 diff --git a/android/src/main/java/com/pdftron/pdftronflutter/helpers/PluginUtils.java b/android/src/main/java/com/pdftron/pdftronflutter/helpers/PluginUtils.java index 75c3afc6..9ed4c8c7 100644 --- a/android/src/main/java/com/pdftron/pdftronflutter/helpers/PluginUtils.java +++ b/android/src/main/java/com/pdftron/pdftronflutter/helpers/PluginUtils.java @@ -4372,7 +4372,7 @@ public static void handleAnnotationCustomToolbarItemPressed(ViewerComponent comp String itemKey = mToolIdMap.get(itemId); if (itemKey != null && annotationCustomToolbarItemPressedEventSink != null) { // this is a custom button - annotationCustomToolbarItemPressedEventSink.success(itemId); + annotationCustomToolbarItemPressedEventSink.success(itemKey); } } diff --git a/pubspec.yaml b/pubspec.yaml index 7f91e27c..abd42876 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: pdftron_flutter description: A convenience wrapper to build Flutter apps that use the PDFTron mobile SDK for smooth, flexible, and stand-alone document viewing. -version: 1.0.1-30 +version: 1.0.1-31 homepage: https://www.pdftron.com repository: https://github.com/PDFTron/pdftron-flutter issue_tracker: https://github.com/PDFTron/pdftron-flutter/issues