From b0effa21a4cb5614a93a2aefb06743c9617a66a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Fri, 26 Jan 2024 15:32:47 +0900 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=87=A6=E7=90=86=E6=94=B9?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nem/lacerta/setting/SettingTagManageFragment.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/feature/setting/src/main/java/one/nem/lacerta/setting/SettingTagManageFragment.java b/feature/setting/src/main/java/one/nem/lacerta/setting/SettingTagManageFragment.java index f01d82f3..98a2dde0 100644 --- a/feature/setting/src/main/java/one/nem/lacerta/setting/SettingTagManageFragment.java +++ b/feature/setting/src/main/java/one/nem/lacerta/setting/SettingTagManageFragment.java @@ -80,10 +80,17 @@ public class SettingTagManageFragment extends Fragment { updateTagList(); } + /** + * タグリストを更新する + */ private void updateTagList() { lacertaLibrary.getTagList().thenAccept(documentTags -> { + int currentTagCount = this.adapter.getItemCount(); this.adapter.setDocumentTags(documentTags); - this.adapter.notifyDataSetChanged(); + if (currentTagCount != this.adapter.getItemCount()) { + this.adapter.notifyItemRangeRemoved(0, currentTagCount); + this.adapter.notifyItemRangeInserted(0, this.adapter.getItemCount()); + } }); }