feat: 默认不显示“接收自动构建版本更新”

This commit is contained in:
HuanCheng65 2023-10-05 18:09:01 +08:00
parent 860ea01f34
commit abc4a7b862
No known key found for this signature in database
GPG Key ID: 5EC9DD60A32C7360
4 changed files with 44 additions and 21 deletions

View File

@ -3,18 +3,27 @@ package com.huanchengfly.tieba.post.ui.page.settings.more
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.BugReport
import androidx.compose.material.icons.outlined.FiberNew
import androidx.compose.material.icons.outlined.Info
import androidx.compose.material.icons.outlined.OfflineBolt
import androidx.compose.runtime.*
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import com.huanchengfly.tieba.post.App
import com.huanchengfly.tieba.post.BuildConfig
@ -26,8 +35,14 @@ import com.huanchengfly.tieba.post.ui.common.prefs.widgets.SwitchPref
import com.huanchengfly.tieba.post.ui.common.prefs.widgets.TextPref
import com.huanchengfly.tieba.post.ui.page.destinations.AboutPageDestination
import com.huanchengfly.tieba.post.ui.page.settings.LeadingIcon
import com.huanchengfly.tieba.post.ui.widgets.compose.*
import com.huanchengfly.tieba.post.ui.widgets.compose.AvatarIcon
import com.huanchengfly.tieba.post.ui.widgets.compose.BackNavigationIcon
import com.huanchengfly.tieba.post.ui.widgets.compose.LocalSnackbarHostState
import com.huanchengfly.tieba.post.ui.widgets.compose.MyScaffold
import com.huanchengfly.tieba.post.ui.widgets.compose.Sizes
import com.huanchengfly.tieba.post.ui.widgets.compose.TitleCentredToolbar
import com.huanchengfly.tieba.post.utils.ImageCacheUtil
import com.huanchengfly.tieba.post.utils.appPreferences
import com.ramcosta.composedestinations.annotation.Destination
import com.ramcosta.composedestinations.navigation.DestinationsNavigator
import kotlinx.coroutines.launch
@ -44,7 +59,12 @@ fun MoreSettingsPage(
backgroundColor = Color.Transparent,
topBar = {
TitleCentredToolbar(
title = stringResource(id = R.string.title_settings_more),
title = {
Text(
text = stringResource(id = R.string.title_settings_more),
fontWeight = FontWeight.Bold, style = MaterialTheme.typography.h6
)
},
navigationIcon = {
BackNavigationIcon(onBackPressed = { navigator.navigateUp() })
}
@ -66,6 +86,7 @@ fun MoreSettingsPage(
.padding(paddingValues)
.fillMaxSize(),
) {
if (context.appPreferences.showExperimentalFeatures) {
prefsItem {
SwitchPref(
leadingIcon = {
@ -83,6 +104,7 @@ fun MoreSettingsPage(
summary = stringResource(id = R.string.tip_check_ci_update)
)
}
}
prefsItem {
SwitchPref(
leadingIcon = {

View File

@ -586,7 +586,7 @@
<string name="button_appeal">申诉</string>
<string name="btn_hide_tip">隐藏该提示</string>
<string name="title_check_ci_update">接收自动构建版本更新</string>
<string name="tip_check_ci_update">需要 App Center 账号且已加入测试,如果你没有,请不要开启此选项!</string>
<string name="tip_check_ci_update">仅供测试</string>
<string name="permission_name_post_notifications">通知</string>
<string name="desc_permission_post_notifications">用于发送消息通知、显示一键签到进度</string>
<string name="title_oksign_finish_time">%s签到完成</string>

View File

@ -348,6 +348,7 @@
<item name="android:windowIsTranslucent">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="dialogCornerRadius">@dimen/radius</item>
</style>
<style name="Theme.Splash" parent="Theme.SplashScreen">

View File

@ -215,7 +215,7 @@
android:title="@string/title_oksign_slow_mode" />
<SwitchPreference
android:defaultValue="false"
android:defaultValue="true"
android:icon="@drawable/ic_round_speed"
android:key="oksign_use_official_oksign"
android:summary="@string/summary_oksign_use_official_oksign"