[Modify]判断中文环境才显示中文提示语

This commit is contained in:
wushaocheng
2023-06-07 17:35:19 +08:00
parent 0dfe37c18c
commit b3898958d6
3 changed files with 18 additions and 9 deletions

View File

@@ -117,6 +117,7 @@ import io.reactivex.disposables.Disposable
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
import java.util.*
/**
@@ -702,7 +703,13 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
.compose(bindUntilEvent(FragmentEvent.DESTROY))
.doOnError {
if (it is VipLevelNotEnoughException) {
dialogManager.showOkDialog("${getString(R.string.not_yet_given)}${giftInfo.giftName}${getString(R.string.rank_of_nobility_required)}${giftInfo.giftVipInfo?.vipName}")
dialogManager.showOkDialog(
"${getString(R.string.not_yet_given)}${giftInfo.giftName}${
getString(
R.string.rank_of_nobility_required
)
}${giftInfo.giftVipInfo?.vipName}"
)
}
}
.subscribe { _, throwable ->
@@ -800,7 +807,13 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
}
})
val buttonItem4 =
ButtonItem(getString(R.string.up_micro)) { toUpMicroPhone(micPosition, currentUid.toString() + "", false) }
ButtonItem(getString(R.string.up_micro)) {
toUpMicroPhone(
micPosition,
currentUid.toString() + "",
false
)
}
//別問為什麽ui調整了順序
//禁用超管的上麥和抱TA上麥
if (!SuperAdminUtil.isSuperAdmin()) {
@@ -1059,7 +1072,9 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
val rvSpeedyMessage =
speedyMessageContainer.findViewById<RecyclerView>(R.id.rv_speedy_message)
val phrases = AvRoomDataManager.get().phrases
if (ListUtils.isListEmpty(phrases) || !TimeUtils.isTomorrow(DemoCache.readSpeedyMessageGoneTime())) {
if (ListUtils.isListEmpty(phrases) || !TimeUtils.isTomorrow(DemoCache.readSpeedyMessageGoneTime())
|| Locale.getDefault().language != "zh"
) {
speedyMessageContainer.visibility = View.GONE
return
}

View File

@@ -50,11 +50,6 @@ class AreaSelectActivity : BaseViewBindingActivity<ActivityAreaSelectBinding>()
setViewModel.changePartitionLiveData.observe(this) {
EventBus.getDefault().post(AreaChangeEvent())
if(mPartitionAdapter.getItem(mPosition)?.desc == "华语区"){
SPUtils.putString(SpConstants.AREA_SELECT, "华语区")
}else {
SPUtils.putString(SpConstants.AREA_SELECT, "其它地区")
}
}
mPartitionAdapter.setOnItemClickListener { _, _, position ->