mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 11:37:37 +00:00
更新処理改善
This commit is contained in:
1 file changed
+8
-1
@@ -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());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user