Skip to content

Commit

Permalink
修复了新用户修改配置时,昵称默认值为空的情况
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangyu committed Feb 8, 2023
1 parent 7f66887 commit 18144b3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/yx/chatrobot/data/UserUiState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import com.yx.chatrobot.data.entity.User

data class UserUiState(
val id: Int = 0,
val name: String = "", // 昵称
val name: String = "用户", // 昵称
val account: String = "", // 账号,也是唯一的(和 id 的区别在于账号可以自己定义)
val description: String = "" // 个性说明 val id:Int
val description: String = "这个人很懒,没有签名" // 个性说明 val id:Int
)

fun User.toUserUiState() = UserUiState(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fun TopMenuView(
putExtra(Intent.EXTRA_SUBJECT, "分享")
putExtra(
Intent.EXTRA_TEXT,
"我正在使用聊天机器人,推荐你也使用:https://cloud.jdysya.top/#s/88r40pXg"
"我正在使用聊天机器人,推荐你也使用:https://cloud.jdysya.top/#s/89FKGp8Q"
)
}
context.startActivity(
Expand Down
12 changes: 0 additions & 12 deletions app/src/main/java/com/yx/chatrobot/ui/theme/Type.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@ val TypographySmall = Typography(
fontSize = 14.sp,
letterSpacing = 0.1.sp
),
/* Other default text styles to override
button = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.W500,
fontSize = 14.sp
),
caption = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 12.sp
)
*/
)

val TypographyMedium = Typography(
Expand Down
3 changes: 2 additions & 1 deletion app/src/test/java/com/yx/chatrobot/ExampleUnitTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ class ExampleUnitTest {

@Test
fun passwordEncode() {

println(encode("hello"))
}

@Test
fun timeToString() {
val times = Date().time/1000
val times = Date().time / 1000
}

}

0 comments on commit 18144b3

Please sign in to comment.