Skip to content

Commit

Permalink
(no UI) Implement renaming properties in Prefs.java
Browse files Browse the repository at this point in the history
  • Loading branch information
airsquared committed Jul 20, 2023
1 parent 8407f3a commit 3957bce
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/airsquared/blobsaver/app/Prefs.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,16 @@ public void delete() {
}
}

public void rename(String name) { // intentionally different name
if (getName().equals(name) || Utils.isEmptyOrNull(name)) {
return;
}
new SavedDeviceBuilder(name).setEcid(getEcid()).setSavePath(getSavePath()).setIdentifier(getIdentifier())
.setBoardConfig(getBoardConfig().orElse(null)).setApnonce(getApnonce().orElse(null))
.setGenerator(getGenerator().orElse(null)).setIncludeBetas(doesIncludeBetas()).save().setBackground(isBackground());
delete();
}

public String getName() {
return node.name();
}
Expand Down

0 comments on commit 3957bce

Please sign in to comment.