Skip to content
This repository has been archived by the owner on Jan 23, 2019. It is now read-only.

Commit

Permalink
Fix caching bug causing some strings to be lost (closes #113)
Browse files Browse the repository at this point in the history
getTag() would cache the result, but after setting a string
to empty content, the cached result wouldn't be invalidated.

This caused some operations to update the contents of a now
ghost tag, hence losing the changes when updating the cache.
  • Loading branch information
Lonami committed Aug 7, 2017
1 parent 6aa90cf commit d958d21
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ void loadTag(ResTag rt) {

public void deleteId(String resourceId) {
mStrings.remove(resourceId);
if (mLastTag != null && mLastTag.getId().equals(resourceId))
mLastTag = null;
}

//endregion
Expand Down

0 comments on commit d958d21

Please sign in to comment.