Suppression de plusieurs elements corrigee
This commit is contained in:
parent
e368fb0cc2
commit
4ad532d316
1 changed files with 3 additions and 0 deletions
|
@ -323,6 +323,8 @@ public class ChatRoomsAdapter extends RecyclerView.Adapter<ChatRoomsAdapter.Chat
|
||||||
|
|
||||||
private void removeRange(int positionStart, int itemCount) {
|
private void removeRange(int positionStart, int itemCount) {
|
||||||
for (int i = 0; i < itemCount; ++i) {
|
for (int i = 0; i < itemCount; ++i) {
|
||||||
|
Core lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||||
|
lc.deleteChatRoom(mRooms.get(positionStart));
|
||||||
mRooms.remove(positionStart);
|
mRooms.remove(positionStart);
|
||||||
}
|
}
|
||||||
notifyItemRangeRemoved(positionStart, itemCount);
|
notifyItemRangeRemoved(positionStart, itemCount);
|
||||||
|
@ -342,6 +344,7 @@ public class ChatRoomsAdapter extends RecyclerView.Adapter<ChatRoomsAdapter.Chat
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemCount() {
|
public int getItemCount() {
|
||||||
|
Core lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||||
|
|
||||||
return this.mRooms.size();
|
return this.mRooms.size();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue