Skip to content

Commit

Permalink
Fix tags not showing up immediately after editing
Browse files Browse the repository at this point in the history
  • Loading branch information
teccheck committed Jun 27, 2021
1 parent a83b6b7 commit 06987c6
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,15 @@ protected void onCreate(Bundle savedInstanceState) {
});

model.getTagsInItem().observe(this, tags -> {
HorizontalScrollView chipsScroll = findViewById(R.id.chips_scroll_layout);
View divider = findViewById(R.id.chips_divider);

if (tags == null || tags.isEmpty()) {
HorizontalScrollView chipsScroll = findViewById(R.id.chips_scroll_layout);
View divider = findViewById(R.id.chips_divider);
chipsScroll.setVisibility(View.GONE);
divider.setVisibility(View.GONE);
} else {
chipsScroll.setVisibility(View.VISIBLE);
divider.setVisibility(View.VISIBLE);
chips.removeAllViews();
for (TagEntity tag : tags) {
Chip chip = new Chip(this);
Expand Down

0 comments on commit 06987c6

Please sign in to comment.