Commit 2095433f07d6e90a59de2e766f84f993f3d8dbca
1 parent
8d151c87
1 优化联系人默认不可选中的逻辑
Showing
2 changed files
with
5 additions
and
2 deletions
config.gradle
module_xiaojiaSoundBox/src/main/java/com/cnlive/strike/xiaojiaspeaker/ui/adapter/SelectIMFriendAdapter.java
| ... | ... | @@ -33,7 +33,10 @@ public class SelectIMFriendAdapter extends RecyclerView.Adapter { |
| 33 | 33 | private String TAG = "SelectIMFriendAdapter"; |
| 34 | 34 | |
| 35 | 35 | public void setCantSelectCount(int hasSelectCount) { |
| 36 | - this.MAX_FRIENDS -= hasSelectCount; | |
| 36 | + if (0 == hasSelectCount) { | |
| 37 | + return; | |
| 38 | + } | |
| 39 | + this.MAX_FRIENDS -= (hasSelectCount-1); | |
| 37 | 40 | } |
| 38 | 41 | |
| 39 | 42 | public void setOnItemCheckBoxListener(OnItemCheckBoxListener onItemCheckBoxListener) { | ... | ... |