个人主页新增下拉刷新功能

在个人主页界面新增下拉刷新功能,提升用户体验。
同时修复了关注按钮的样式问题,使其在
不同状态下显示正确的颜色和文字。
此外,还修复了登录后无法获取用户信息的问题,确保用户登录后能够正常使用应用。
This commit is contained in:
2024-09-06 17:43:43 +08:00
parent f357e12f7c
commit 1fc487c73d
7 changed files with 128 additions and 72 deletions

View File

@@ -80,10 +80,12 @@ class MainActivity : ComponentActivity() {
/**
* 获取账号信息
*/
suspend fun getAccount(): Boolean {
private suspend fun getAccount(): Boolean {
val accountService: AccountService = AccountServiceImpl()
try {
val resp = accountService.getMyAccount()
// 设置当前登录用户 ID
AppState.UserId = resp.id
return true
} catch (e: Exception) {
return false