fix:compose设置模块同步设置模块的修改,修复部分机型设置项的描述文字显示不全的问题
This commit is contained in:
@ -96,17 +96,17 @@ class ComposeGameDownloadSettingActivity : ComposeBaseActivity() {
|
||||
|
||||
private fun startFilePath(dirPath: String) {
|
||||
val intent = Intent(Intent.ACTION_GET_CONTENT)
|
||||
val uri = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
val buildConfig =
|
||||
ARouter.getInstance().build(RouteConsts.provider.buildConfig).navigation() as? IBuildConfigProvider
|
||||
FileProvider.getUriForFile(this, buildConfig?.getApplicationId() ?: "", File(dirPath))
|
||||
} else {
|
||||
Uri.fromFile(File(dirPath))
|
||||
}
|
||||
intent.setDataAndType(uri, "file/*")
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
try {
|
||||
val uri = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
val buildConfig =
|
||||
ARouter.getInstance().build(RouteConsts.provider.buildConfig).navigation() as? IBuildConfigProvider
|
||||
FileProvider.getUriForFile(this, buildConfig?.getApplicationId() ?: "", File(dirPath))
|
||||
} else {
|
||||
Uri.fromFile(File(dirPath))
|
||||
}
|
||||
intent.setDataAndType(uri, "file/*")
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
startActivity(intent)
|
||||
} catch (e: Exception) {
|
||||
Utils.toast(this, "无法找到文件管理器")
|
||||
|
||||
@ -301,16 +301,27 @@ class ComposeSettingActivity : ComposeBaseActivity() {
|
||||
LogoutButton {
|
||||
val dialogUtils = ARouter.getInstance().build(RouteConsts.provider.dialogUtils)
|
||||
.navigation() as? IDialogUtilsProvider
|
||||
dialogUtils?.showForceDialog(
|
||||
this@ComposeSettingActivity, "退出登录", "退出账号即会回到游客状态,很多功能将无法使用(例如评论、客服消息),确定退出吗?",
|
||||
"确定退出", "取消", {
|
||||
loadingDialog = dialogUtils.showWaitDialog(this@ComposeSettingActivity, "退出登录中...")
|
||||
DialogHelper.showDialog(
|
||||
this@ComposeSettingActivity,
|
||||
R.string.logout_dialog_title.toResString(),
|
||||
R.string.logout_dialog_content.toResString(),
|
||||
R.string.logout_dialog_confirm.toResString(),
|
||||
R.string.cancel.toResString(),
|
||||
{
|
||||
loadingDialog = dialogUtils?.showWaitDialog(this@ComposeSettingActivity, "退出登录中...")
|
||||
LoginUtils.logout {
|
||||
UserRepository.getInstance().logout()
|
||||
if (loadingDialog != null) loadingDialog!!.dismiss()
|
||||
finish()
|
||||
}
|
||||
}, {}
|
||||
},
|
||||
extraConfig = DialogHelper.Config(
|
||||
centerTitle = true,
|
||||
centerContent = true
|
||||
),
|
||||
uiModificationCallback = {
|
||||
it.confirmTv.setTextColor(R.color.theme_red.toColor(this@ComposeSettingActivity))
|
||||
}
|
||||
)
|
||||
}
|
||||
Space(48.dp)
|
||||
@ -373,10 +384,7 @@ class ComposeSettingActivity : ComposeBaseActivity() {
|
||||
private fun initWechatBindStatus() {
|
||||
if (UserManager.getInstance().isLoggedIn) {
|
||||
val json = SPUtils.getString(Constants.SP_WECHAT_CONFIG)
|
||||
val (_, _, notice) = GsonUtils.fromJson(
|
||||
json,
|
||||
WechatConfigEntity::class.java
|
||||
)
|
||||
val notice = GsonUtils.fromJson(json, WechatConfigEntity::class.java).notice
|
||||
mWeChatBindText = if (notice) "已开启" else "已关闭"
|
||||
} else {
|
||||
mWeChatBindText = ""
|
||||
|
||||
@ -40,7 +40,7 @@ import java.util.*
|
||||
|
||||
class NetworkDiagnosisActivity : ToolBarActivity() {
|
||||
|
||||
data class ProgressAndDetail(val progress: Int, val detail: String)
|
||||
class ProgressAndDetail(val progress: Int, val detail: String)
|
||||
|
||||
private lateinit var mResult: TextView
|
||||
private lateinit var mProgress: TextView
|
||||
@ -98,7 +98,7 @@ class NetworkDiagnosisActivity : ToolBarActivity() {
|
||||
|
||||
// MAC
|
||||
builder.append("MAC:")
|
||||
builder.append(DeviceUtils.getMac(applicationContext))
|
||||
builder.append("")
|
||||
builder.append("\n")
|
||||
|
||||
progress += 3
|
||||
|
||||
@ -1,21 +1,19 @@
|
||||
package com.gh.gamecenter.setting.compose.entity
|
||||
|
||||
import android.os.Parcelable
|
||||
import androidx.annotation.Keep
|
||||
import com.gh.gamecenter.feature.entity.Badge
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Keep
|
||||
@Parcelize
|
||||
data class ConflictUserEntity(
|
||||
class ConflictUserEntity(
|
||||
val user: User? = null,
|
||||
@SerializedName("register_type")
|
||||
var registerType: String = ""
|
||||
) : Parcelable
|
||||
|
||||
@Parcelize
|
||||
data class User(
|
||||
class User(
|
||||
@SerializedName("_id")
|
||||
var id: String = "",
|
||||
var name: String = "",
|
||||
|
||||
@ -107,7 +107,7 @@ fun SettingItem(
|
||||
start.linkTo(parent.start, 16.dp)
|
||||
end.linkTo(parent.end, 60.dp)
|
||||
bottom.linkTo(parent.bottom, 15.dp)
|
||||
width = Dimension.matchParent
|
||||
width = Dimension.fillToConstraints
|
||||
height = Dimension.preferredWrapContent
|
||||
}) {
|
||||
Description(name, tips, showTips)
|
||||
|
||||
@ -62,4 +62,7 @@
|
||||
<string name="change_phone_text">更换手机号</string>
|
||||
<string name="change_phone_same">新手机号与当前手机号相同,暂不支持本\n次绑定</string>
|
||||
<string name="change_phone_same_ok">我知道了</string>
|
||||
<string name="logout_dialog_title">退出登录</string>
|
||||
<string name="logout_dialog_content">退出账号即会回到游客状态,很多功能将无法使用(例如评论、客服消息),确定退出吗?</string>
|
||||
<string name="logout_dialog_confirm">确定退出</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user