Skip to content

Commit

Permalink
Fix issue where profile changes could be interpreted as tag renames, …
Browse files Browse the repository at this point in the history
…resulting in loss of data.

Bump to version 1.4.21
  • Loading branch information
geheur committed Apr 25, 2023
1 parent aa32593 commit d9f3ae7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {
}

group = 'com.banktaglayouts'
version = '1.4.20'
version = '1.4.21'
sourceCompatibility = '1.8'

tasks.withType(JavaCompile) {
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/banktaglayouts/BankTagLayoutsPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,10 @@ void checkVersionUpgrade() {
}

private void handlePotentialTagRename(ConfigChanged event) {
// Profile changes can look like tag renames sometimes, but we do not want to modify the config in that case
// because it can cause people to lose their data. Real renames come through on the client thread.
if (!client.isClientThread()) return;

String oldValue = event.getOldValue();
String newValue = event.getNewValue();
Set<String> oldTags = new HashSet<>(Text.fromCSV(oldValue == null ? "" : oldValue));
Expand Down

0 comments on commit d9f3ae7

Please sign in to comment.