mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 16:03:15 +00:00
更新処理改善
This commit is contained in:
parent
21b198bc35
commit
b0effa21a4
|
@ -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());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user