Suppression de plusieurs elements corrigee

This commit is contained in:
LuLe73 2018-05-28 15:56:31 +02:00 committed by Lucas Legrand
parent e368fb0cc2
commit 4ad532d316

View file

@ -323,6 +323,8 @@ public class ChatRoomsAdapter extends RecyclerView.Adapter<ChatRoomsAdapter.Chat
private void removeRange(int positionStart, int itemCount) {
for (int i = 0; i < itemCount; ++i) {
Core lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
lc.deleteChatRoom(mRooms.get(positionStart));
mRooms.remove(positionStart);
}
notifyItemRangeRemoved(positionStart, itemCount);
@ -342,6 +344,7 @@ public class ChatRoomsAdapter extends RecyclerView.Adapter<ChatRoomsAdapter.Chat
@Override
public int getItemCount() {
Core lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
return this.mRooms.size();
}