1、修复消息条数红点显示过多的问题

This commit is contained in:
老皮 2024-09-12 15:42:16 +08:00
parent 0b62d4ddc4
commit 745702e36c

View File

@ -130,7 +130,11 @@ public class MainMeAdapter extends RecyclerView.Adapter<MainMeAdapter.Vh> {
mName.setText(bean.getName()); mName.setText(bean.getName());
if (MainActivity.messageNumber > 0 && bean.getId() == 101){ if (MainActivity.messageNumber > 0 && bean.getId() == 101){
message_redpoint.setVisibility(View.VISIBLE); message_redpoint.setVisibility(View.VISIBLE);
if (MainActivity.messageNumber > 99){
message_redpoint.setText("99+");
}else {
message_redpoint.setText(String.valueOf(MainActivity.messageNumber)); message_redpoint.setText(String.valueOf(MainActivity.messageNumber));
}
}else { }else {
message_redpoint.setVisibility(View.GONE); message_redpoint.setVisibility(View.GONE);
} }