Skip to content

Commit

Permalink
make sure to get the correct index
Browse files Browse the repository at this point in the history
  • Loading branch information
HSGamer committed Oct 7, 2024
1 parent 81027be commit 49cb1c3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public String getDisplayValue(@Nullable Double value, @Nullable String formatTyp
}
}

public String getDisplayLine(int index) {
Map.Entry<UUID, Double> dataSnapshot = holder.getSnapshotAgent().getSnapshotByIndex(index).orElse(null);
public String getDisplayLine(int index /* 1-based */) {
Map.Entry<UUID, Double> dataSnapshot = holder.getSnapshotAgent().getSnapshotByIndex(index - 1).orElse(null);
String line = this.line
.replace("{index}", String.valueOf(index))
.replace("{uuid}", getDisplayUuid(dataSnapshot == null ? null : dataSnapshot.getKey()))
Expand Down

0 comments on commit 49cb1c3

Please sign in to comment.