Skip to content

Commit

Permalink
feat: 主题切换埋伏笔&首页标题栏动画&个人页字体修复
Browse files Browse the repository at this point in the history
Signed-off-by: XC-Qan <[email protected]>
  • Loading branch information
SpaceXC committed Aug 9, 2024
1 parent eb47d8f commit db9dad2
Show file tree
Hide file tree
Showing 14 changed files with 218 additions and 97 deletions.
13 changes: 8 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ plugins {
alias(libs.plugins.google.protobuf)
alias(libs.plugins.google.dagger.hilt.android)
alias(libs.plugins.google.devtools.ksp)

kotlin("kapt")
id("kotlin-parcelize")
alias(libs.plugins.baselineprofile)
alias(libs.plugins.kotlin.serialization)
}

android {
Expand All @@ -20,13 +20,12 @@ android {

val releaseNumber = 3
defaultConfig {

applicationId = "cn.spacexc.wearbili.remake"
minSdk = libs.versions.minSdk.get().toInt()
targetSdk = libs.versions.targetSdk.get().toInt()
minSdk = 21
targetSdk = 35
compileSdk = 35
versionCode = 47
versionName = "Atlas 阿特拉斯"

vectorDrawables {
useSupportLibrary = true
}
Expand Down Expand Up @@ -156,6 +155,10 @@ dependencies {
implementation(libs.androidx.paging.compose)


implementation(libs.androidx.navigation.compose)
implementation(libs.kotlinx.serialization.json)



/*// For media playback using ExoPlayer
implementation(libs.androidx.media3.exoplayer)
Expand Down
4 changes: 2 additions & 2 deletions app/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
buildToolsVersion = libs.versions.buildTool.get()

defaultConfig {
minSdk = libs.versions.minSdk.get().toInt()
lint.targetSdk = libs.versions.targetSdk.get().toInt()
minSdk = 21
lint.targetSdk = 35

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class Application : android.app.Application(), Configuration.Provider {
fun getVersionName(): String {
val packageInfo =
getApplication().packageManager.getPackageInfo(getApplication().packageName, 0)
return packageInfo.versionName
return packageInfo.versionName ?: ""
}

fun getReleaseNumber(): Long {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Link
import androidx.compose.material.icons.outlined.PlayCircle
import androidx.compose.material.icons.outlined.Redeem
import androidx.compose.material.icons.outlined.ThumbUp
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
Expand Down Expand Up @@ -613,7 +612,7 @@ fun DynamicContent(

2 -> {
Icon(
imageVector = Icons.Outlined.ThumbUp,
painter = painterResource(id = R.drawable.icon_thumb_up),
contentDescription = null,
modifier = Modifier,
tint = Color.White
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,17 @@ fun ProfileScreen(
fontSize = 12.sp,
color = Color.White,
fontWeight = FontWeight.Bold,
modifier = Modifier.shimmerPlaceHolder(user?.coins == null)
modifier = Modifier.shimmerPlaceHolder(user?.coins == null),
fontFamily = wearbiliFontFamily
)
Spacer(modifier = Modifier.height(4.dp))
Text(
text = "硬币",
fontSize = 11.sp,
color = Color.White,
fontWeight = FontWeight.Medium,
modifier = Modifier.alpha(0.8f)
modifier = Modifier.alpha(0.8f),
fontFamily = wearbiliFontFamily
)
}
Box(
Expand All @@ -270,15 +272,17 @@ fun ProfileScreen(
fontSize = 12.sp,
color = Color.White,
fontWeight = FontWeight.Bold,
modifier = Modifier.shimmerPlaceHolder(user?.coins == null)
modifier = Modifier.shimmerPlaceHolder(user?.coins == null),
fontFamily = wearbiliFontFamily
)
Spacer(modifier = Modifier.height(4.dp))
Text(
text = "粉丝",
fontSize = 11.sp,
color = Color.White,
fontWeight = FontWeight.Medium,
modifier = Modifier.alpha(0.8f)
modifier = Modifier.alpha(0.8f),
fontFamily = wearbiliFontFamily
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ import cn.spacexc.wearbili.remake.app.search.ui.SearchActivity
import cn.spacexc.wearbili.remake.app.settings.LocalConfiguration
import cn.spacexc.wearbili.remake.app.settings.ui.SettingsActivity
import cn.spacexc.wearbili.remake.app.splash.remote.Version
import cn.spacexc.wearbili.remake.app.splash.ui.SplashScreenActivity
import cn.spacexc.wearbili.remake.common.ui.OutlinedRoundButton
import cn.spacexc.wearbili.remake.common.ui.TitleBackground
import cn.spacexc.wearbili.remake.common.ui.WearBiliAnimatedContent
Expand Down Expand Up @@ -172,6 +171,7 @@ fun MainActivityScreen(
onDropdown = {
isDropdownMenuShowing = !isDropdownMenuShowing
},
currentPageIndex = pagerState.currentPage,
onRetry = {}
) {
val recommendSource = LocalConfiguration.current.recommendSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ fun Activity.Media3PlayerScreen(
enableOneFingerZoom = false,
onDoubleTap = {}
)*/

) {
//region player surface
Box(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,8 @@ fun CommentCard(
putExtra(PARAM_VIDEO_AID, oid)
putExtra(PARAM_ROOT_COMMENT_RPID, commentRpid)
putExtra(PARAM_MID, uploaderMid)
})
}
)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import androidx.datastore.dataStore
import cn.spacexc.wearbili.remake.proto.settings.AppConfiguration
import cn.spacexc.wearbili.remake.proto.settings.QuickToolBarFunction
import cn.spacexc.wearbili.remake.proto.settings.RecommendSource
import cn.spacexc.wearbili.remake.proto.settings.Theme
import cn.spacexc.wearbili.remake.proto.settings.copy
import com.google.protobuf.InvalidProtocolBufferException
import java.io.InputStream
Expand Down Expand Up @@ -35,6 +36,11 @@ object AppConfigurationSerializer : Serializer<AppConfiguration> {
functionOne = QuickToolBarFunction.History
functionOne = QuickToolBarFunction.Search
}
customization = customization.copy {
recommendPageLargeCard = false
videoCoverColorAbsorb = true
theme = Theme.Light
}
}


Expand Down
Loading

0 comments on commit db9dad2

Please sign in to comment.