feat:移除房间消息快捷语
This commit is contained in:
@@ -411,7 +411,7 @@ public class XChatApplication extends BaseApp {
|
||||
httpParams.put("channel", AppMetaDataUtil.getChannelID());
|
||||
httpParams.put("lang", LanguageUtils.INSTANCE.getSystemLanguage().toLanguageTag());
|
||||
RxNet.init(context)
|
||||
.debug(false)
|
||||
.debug(Env.isDebug())
|
||||
.setBaseUrl(url)
|
||||
.addInterceptors(new ParamsInterceptor(httpParams))
|
||||
.addInterceptors(new NoParamsInterceptor())//注意:拦截器的添加顺序,请求的拦截顺序
|
||||
|
@@ -1045,48 +1045,6 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fun initSpeedyMessage(speedyMessageContainer: View) {
|
||||
val rvSpeedyMessage =
|
||||
speedyMessageContainer.findViewById<RecyclerView>(R.id.rv_speedy_message)
|
||||
val phrases = AvRoomDataManager.get().phrases
|
||||
if (ListUtils.isListEmpty(phrases) || !TimeUtils.isTomorrow(DemoCache.readSpeedyMessageGoneTime())) {
|
||||
speedyMessageContainer.visibility = View.GONE
|
||||
return
|
||||
}
|
||||
val adapter: BaseQuickAdapter<String, BaseViewHolder> =
|
||||
object : BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_speedy_message) {
|
||||
override fun convert(helper: BaseViewHolder, item: String) {
|
||||
(helper.itemView as TextView).text = item
|
||||
}
|
||||
}
|
||||
rvSpeedyMessage.adapter = adapter
|
||||
rvSpeedyMessage.layoutManager = LinearLayoutManager(
|
||||
mContext,
|
||||
LinearLayoutManager.HORIZONTAL,
|
||||
false
|
||||
)
|
||||
adapter.setNewData(phrases)
|
||||
adapter.setOnItemClickListener { _: BaseQuickAdapter<*, *>?, _: View?, position: Int ->
|
||||
if (CurrentTimeUtils.getCurrentTime() - lastSendTime > 10000) {
|
||||
sendMsg(phrases[position])
|
||||
lastSendTime = CurrentTimeUtils.getCurrentTime()
|
||||
} else {
|
||||
val roomInfo =
|
||||
AvRoomDataManager.get().mCurrentRoomInfo ?: return@setOnItemClickListener
|
||||
if (roomInfo.isCloseScreen) {
|
||||
toast("房間公屏已關閉")
|
||||
return@setOnItemClickListener
|
||||
}
|
||||
SingleToastUtil.showToast("你發送的太頻繁啦,請稍後再試")
|
||||
}
|
||||
}
|
||||
speedyMessageContainer.findViewById<View>(R.id.iv_close_speedy_message).setOnClickListener {
|
||||
speedyMessageContainer.visibility = View.GONE
|
||||
DemoCache.saveSpeedyMessageGoneTime(System.currentTimeMillis())
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFollowSuccess(position: Int) {
|
||||
messageView.changeFollowStatus(position, true)
|
||||
}
|
||||
|
@@ -143,7 +143,6 @@ public class HomePartyRoomFragment extends BaseRoomFragment<IHomePartyView, Home
|
||||
myUid = AuthModel.get().getCurrentUid();
|
||||
gameBinding.setRoomInfo(AvRoomDataManager.get().mCurrentRoomInfo);
|
||||
hideKtvRelaView();
|
||||
initSpeedyMessage(gameBinding.flSpeedyMessage);
|
||||
updateQueuingMicBtn();
|
||||
updatePkScoreBoard();
|
||||
initRoomPkOrder(AvRoomDataManager.get().showPkBeginTime, AvRoomDataManager.get().pkBeginTime);
|
||||
|
@@ -80,7 +80,7 @@ class SingleRoomFragment : BaseRoomFragment<ISingleRoomView?, SingleRoomPresente
|
||||
@SuppressLint("CheckResult")
|
||||
override fun initiate() {
|
||||
super.initiate()
|
||||
initSpeedyMessage(gameBinding.flSpeedyMessage)
|
||||
// initSpeedyMessage(gameBinding.flSpeedyMessage)
|
||||
fansTeamViewModel.loadFansTeamInitInfo()
|
||||
|
||||
fansTeamViewModel.fansTeamInitInfoLiveData.observe(viewLifecycleOwner) {
|
||||
|
@@ -92,33 +92,6 @@
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_speedy_message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="22dp"
|
||||
android:layout_above="@+id/bottom_view"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_marginBottom="6dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_speedy_message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:clipToPadding="false"
|
||||
android:scrollbars="none" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close_speedy_message"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/ic_speedymsg_close" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<com.chwl.app.avroom.widget.BottomView
|
||||
android:id="@+id/bottom_view"
|
||||
android:layout_width="match_parent"
|
||||
@@ -129,7 +102,7 @@
|
||||
android:id="@+id/message_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/fl_speedy_message"
|
||||
android:layout_above="@+id/bottom_view"
|
||||
android:layout_below="@id/micro_view"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
@@ -201,7 +174,7 @@
|
||||
android:id="@+id/iv_queuing_micro"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/fl_speedy_message"
|
||||
android:layout_above="@id/bottom_view"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
|
@@ -108,35 +108,6 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_speedy_message"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_marginBottom="6dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottom_view"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_speedy_message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:clipToPadding="false"
|
||||
android:scrollbars="none" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close_speedy_message"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/ic_speedymsg_close" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<com.chwl.app.avroom.widget.BottomView
|
||||
android:id="@+id/bottom_view"
|
||||
android:layout_width="0dp"
|
||||
@@ -193,7 +164,7 @@
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@id/fl_speedy_message"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottom_view"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
@@ -205,7 +176,7 @@
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginEnd="90dp"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
app:layout_constraintBottom_toTopOf="@id/fl_speedy_message"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottom_view"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/barrier_micro" />
|
||||
|
Reference in New Issue
Block a user