mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 17:53:14 +00:00
正常に切り替えできるように
This commit is contained in:
parent
0735c90d5e
commit
331a520be0
|
@ -133,10 +133,14 @@ public class LacertaApplyTagDialog extends DialogFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void applyChangeToVariable(boolean isChecked, String tagId) {
|
private void applyChangeToVariable(boolean isChecked, String tagId) {
|
||||||
|
logger.debug("applyChangeToVariable", "isChecked: " + isChecked);
|
||||||
|
logger.debug("applyChangeToVariable", "tagId: " + tagId);
|
||||||
|
logger.debug("applyChangeToVariable", "this.registeredTags.size(): " + this.registeredTags.size());
|
||||||
|
logger.debug("applyChangeToVariable", "this.appliedTags.size(): " + this.appliedTags.size());
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
this.registeredTags.stream().findAny().filter(tag -> tag.getId().equals(tagId)).ifPresent(tag -> this.appliedTags.add(tag));
|
this.registeredTags.stream().filter(tag -> tag.getId().equals(tagId)).findFirst().ifPresent(tag -> this.appliedTags.add(tag));
|
||||||
} else {
|
} else {
|
||||||
this.appliedTags.stream().findAny().filter(tag -> tag.getId().equals(tagId)).ifPresent(tag -> this.appliedTags.remove(tag));
|
this.appliedTags.stream().filter(tag -> tag.getId().equals(tagId)).findFirst().ifPresent(tag -> this.appliedTags.remove(tag));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user