Skip to content

Commit

Permalink
Update MainActivity.java
Browse files Browse the repository at this point in the history
  • Loading branch information
SlaVcE14 committed Oct 28, 2023
1 parent f795072 commit 343ef77
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions app/src/main/java/com/sjapps/jsonlist/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,11 @@ public void handleOnBackPressed() {
TransitionManager.beginDelayedTransition(viewGroup, autoTransition);


String[] pathStrings = data.splitPath();
data.clearPath();

String Title = "";
for (int i = 0; i < pathStrings.length-1; i++) {
data.setPath(data.getPath().concat((data.isEmptyPath()?"":"///") + pathStrings[i]));
}
if (pathStrings.length > 1) {
Title = JsonData.getName(pathStrings[pathStrings.length-2]);
}
data.goBack();

open(Title, data.getPath());
String[] pathString = data.splitPath();
open(JsonData.getName(pathString[pathString.length-1]), data.getPath());
if (data.isEmptyPath()) {
backBtn.setVisibility(View.GONE);
}
Expand Down

0 comments on commit 343ef77

Please sign in to comment.