mirror of
https://codeberg.org/r4v3r23/mysu.git
synced 2024-09-20 00:50:35 +00:00
Fix some stuff
This commit is contained in:
parent
beef898be4
commit
db3c4c424b
3 changed files with 4 additions and 1 deletions
|
@ -99,6 +99,7 @@ public class AddNodeBottomSheetDialog extends BottomSheetDialogFragment {
|
||||||
|
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onNodeAdded();
|
listener.onNodeAdded();
|
||||||
|
dismiss();
|
||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
|
@ -117,10 +117,10 @@ public class EditNodeBottomSheetDialog extends BottomSheetDialogFragment {
|
||||||
jsonObject.put("name", nodeName);
|
jsonObject.put("name", nodeName);
|
||||||
|
|
||||||
listener.onNodeEdited(Node.fromJson(nodeJson), Node.fromJson(jsonObject));
|
listener.onNodeEdited(Node.fromJson(nodeJson), Node.fromJson(jsonObject));
|
||||||
|
dismiss();
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
dismiss();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,8 @@ public class NodeSelectionBottomSheetDialog extends BottomSheetDialogFragment im
|
||||||
if (node != null) {
|
if (node != null) {
|
||||||
nodes.add(node);
|
nodes.add(node);
|
||||||
jsonArray.put(i, node.toJson().toString());
|
jsonArray.put(i, node.toJson().toString());
|
||||||
|
} else {
|
||||||
|
jsonArray.remove(i);
|
||||||
}
|
}
|
||||||
} catch (JSONException ex) {
|
} catch (JSONException ex) {
|
||||||
throw new RuntimeException(ex);
|
throw new RuntimeException(ex);
|
||||||
|
|
Loading…
Reference in a new issue