From 2636dd85f1c737816f12261033e959e29b577a57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Wed, 7 Aug 2024 20:48:40 +0100 Subject: [PATCH] Remove dynamic shortcut when deleting device --- .../gadgetbridge/adapter/GBDeviceAdapterv2.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/GBDeviceAdapterv2.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/GBDeviceAdapterv2.java index a32a1d4ad..3d498defd 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/GBDeviceAdapterv2.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/GBDeviceAdapterv2.java @@ -923,10 +923,11 @@ public class GBDeviceAdapterv2 extends ListAdapter= Build.VERSION_CODES.R) { + removeDynamicShortcut(device); + } } catch (Exception ex) { GB.toast(context, context.getString(R.string.error_deleting_device, ex.getMessage()), Toast.LENGTH_LONG, GB.ERROR, ex); } finally { @@ -1461,6 +1462,13 @@ public class GBDeviceAdapterv2 extends ListAdapter { @Override public boolean areItemsTheSame(@NonNull GBDevice oldItem, @NonNull GBDevice newItem) {