Skip to content

Commit

Permalink
Fix doubly added notes and diaper editors
Browse files Browse the repository at this point in the history
  • Loading branch information
MrApplejuice committed Sep 1, 2024
1 parent f152f38 commit 34df8c8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ private void resetChildHistoryLoader() {
}

public void updateChild(BabyBuddyClient.Child c, ChildrenStateTracker stateTracker) {
if (childObserver != null && child == c && stateTracker == childObserver.getTracker()) {
return;
}

clear();
this.child = c;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ public boolean isClosed() {
return closed || ChildrenStateTracker.this.closed;
}

public ChildrenStateTracker getTracker() {
return ChildrenStateTracker.this;
}

private void update() {
if (isClosed()) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1055,4 +1055,4 @@ class LoggingButtonController(
}
}
}
}
}

0 comments on commit 34df8c8

Please sign in to comment.