From db3c4c424be36988671d90ad5df0856d524c0752 Mon Sep 17 00:00:00 2001 From: pokkst Date: Wed, 24 May 2023 22:02:19 -0500 Subject: [PATCH] Fix some stuff --- .../mynero/wallet/fragment/dialog/AddNodeBottomSheetDialog.java | 1 + .../wallet/fragment/dialog/EditNodeBottomSheetDialog.java | 2 +- .../wallet/fragment/dialog/NodeSelectionBottomSheetDialog.java | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/mynero/wallet/fragment/dialog/AddNodeBottomSheetDialog.java b/app/src/main/java/net/mynero/wallet/fragment/dialog/AddNodeBottomSheetDialog.java index 7a8e37c..470d75c 100644 --- a/app/src/main/java/net/mynero/wallet/fragment/dialog/AddNodeBottomSheetDialog.java +++ b/app/src/main/java/net/mynero/wallet/fragment/dialog/AddNodeBottomSheetDialog.java @@ -99,6 +99,7 @@ public class AddNodeBottomSheetDialog extends BottomSheetDialogFragment { if (listener != null) { listener.onNodeAdded(); + dismiss(); } } catch (JSONException e) { throw new RuntimeException(e); diff --git a/app/src/main/java/net/mynero/wallet/fragment/dialog/EditNodeBottomSheetDialog.java b/app/src/main/java/net/mynero/wallet/fragment/dialog/EditNodeBottomSheetDialog.java index 47af12f..b9c7593 100644 --- a/app/src/main/java/net/mynero/wallet/fragment/dialog/EditNodeBottomSheetDialog.java +++ b/app/src/main/java/net/mynero/wallet/fragment/dialog/EditNodeBottomSheetDialog.java @@ -117,10 +117,10 @@ public class EditNodeBottomSheetDialog extends BottomSheetDialogFragment { jsonObject.put("name", nodeName); listener.onNodeEdited(Node.fromJson(nodeJson), Node.fromJson(jsonObject)); + dismiss(); } catch (JSONException e) { throw new RuntimeException(e); } - dismiss(); }); } diff --git a/app/src/main/java/net/mynero/wallet/fragment/dialog/NodeSelectionBottomSheetDialog.java b/app/src/main/java/net/mynero/wallet/fragment/dialog/NodeSelectionBottomSheetDialog.java index c32b08e..4803d87 100644 --- a/app/src/main/java/net/mynero/wallet/fragment/dialog/NodeSelectionBottomSheetDialog.java +++ b/app/src/main/java/net/mynero/wallet/fragment/dialog/NodeSelectionBottomSheetDialog.java @@ -79,6 +79,8 @@ public class NodeSelectionBottomSheetDialog extends BottomSheetDialogFragment im if (node != null) { nodes.add(node); jsonArray.put(i, node.toJson().toString()); + } else { + jsonArray.remove(i); } } catch (JSONException ex) { throw new RuntimeException(ex);