相亲牵手飘屏优化(自己房间的飘屏不飘,排队显示间隔增加)

This commit is contained in:
huangjian
2021-03-02 17:00:51 +08:00
parent 58de773287
commit 5cac50dc0d

View File

@@ -207,7 +207,7 @@ public class RoomEffectView extends FrameLayout {
messagesDatingAll.add(chatRoomMessage);
if (disposableDatingAll == null || messagesDatingAll.size() == 1) {
isCreateDatingAll = true;
disposableDatingAll = Observable.interval(0, PERIOD, TimeUnit.MILLISECONDS)
disposableDatingAll = Observable.interval(0, 3, TimeUnit.SECONDS)
.observeOn(AndroidSchedulers.mainThread())
.doOnNext(aLong -> {
if (messagesDatingAll.size() > 0 && !isCreateDatingAll)
@@ -224,6 +224,8 @@ public class RoomEffectView extends FrameLayout {
if (attachment == null) return;
DatingAllNotifyInfo notifyInfo = attachment.getDatingAllNotifyInfo();
if (notifyInfo == null) return;
//自己房间不需要飘
if (AvRoomDataManager.get().getRoomUid() == notifyInfo.getRoomUid()) return;
TextView textView = (TextView) LayoutInflater.from(mContext).inflate(R.layout.layout_room_dating_all_notify, null);
textView.setOnClickListener(v -> AVRoomActivity.start(mContext, notifyInfo.getRoomUid()));
int defaultBg = R.drawable.bg_dating_hand_1;