Fix some stuff

This commit is contained in:
pokkst 2023-05-24 22:02:19 -05:00
parent beef898be4
commit db3c4c424b
No known key found for this signature in database
GPG Key ID: 90C2ED85E67A50FF
3 changed files with 4 additions and 1 deletions

View File

@ -99,6 +99,7 @@ public class AddNodeBottomSheetDialog extends BottomSheetDialogFragment {
if (listener != null) {
listener.onNodeAdded();
dismiss();
}
} catch (JSONException e) {
throw new RuntimeException(e);

View File

@ -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();
});
}

View File

@ -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);