禁止在主页进行unfollow操作

This commit is contained in:
2024-10-26 21:59:37 +08:00
parent e8ddd67219
commit e1ba8709de
4 changed files with 12 additions and 8 deletions

View File

@@ -14,8 +14,8 @@ android {
applicationId = "com.aiosman.riderpro"
minSdk = 24
targetSdk = 34
versionCode = 1000015
versionName = "1.0.000.15"
versionCode = 1000014
versionName = "1.0.000.14"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {

View File

@@ -282,11 +282,12 @@ fun MomentTopRowGroup(
MomentPostLocation(momentEntity.location)
}
}
if (showFollowButton) {
val isFollowing = momentEntity.followStatus
if (showFollowButton && !isFollowing) {
Spacer(modifier = Modifier.width(16.dp))
if (AppState.UserId != momentEntity.authorId) {
FollowButton(
isFollowing = momentEntity.followStatus
isFollowing = false
) {
onFollowClick()
}

View File

@@ -29,6 +29,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
@@ -163,7 +164,7 @@ fun CheckUpdateDialog() {
) {
Spacer(modifier = Modifier.height(48.dp))
Text(
"New version",
stringResource(id = R.string.update_find_new_version),
fontWeight = FontWeight.W900,
fontSize = 22.sp,
color = AppColors.text
@@ -196,7 +197,7 @@ fun CheckUpdateDialog() {
modifier = Modifier.fillMaxWidth()
) {
ActionButton(
text = "Cancel",
text = stringResource(id = R.string.update_later),
color = AppColors.text,
backgroundColor = AppColors.basicMain,
modifier = Modifier.weight(1f),
@@ -209,7 +210,7 @@ fun CheckUpdateDialog() {
}
Spacer(modifier = Modifier.width(16.dp))
ActionButton(
text = "Update",
text = stringResource(id = R.string.update_update_now),
backgroundColor = AppColors.main,
color = AppColors.mainText,
modifier = Modifier.weight(1f),

View File

@@ -259,6 +259,8 @@ fun ProfileV3(
tint = AppColors.text
)
}
val themeModeString =
if (AppState.darkMode) R.string.light_mode else R.string.dark_mode
DropdownMenu(
expanded = expanded,
onDismissRequest = { expanded = false },
@@ -297,7 +299,7 @@ fun ProfileV3(
}
},
MenuItem(
stringResource(R.string.dark_mode),
stringResource(themeModeString),
R.drawable.rider_pro_theme_mode_light
) {
expanded = false