auth to server-V82
This commit is contained in:
parent
cbe0bc58ce
commit
5c4af08bff
2 changed files with 13 additions and 3 deletions
|
|
@ -100,7 +100,7 @@ data class UserDetail(
|
||||||
val displayName: String,
|
val displayName: String,
|
||||||
|
|
||||||
@Json(name = "avatar_url")
|
@Json(name = "avatar_url")
|
||||||
val avatarUrl: String?,
|
val SearchAvatarUrl: String?,
|
||||||
|
|
||||||
@Json(name = "banner_url")
|
@Json(name = "banner_url")
|
||||||
val bannerUrl: String?,
|
val bannerUrl: String?,
|
||||||
|
|
@ -110,4 +110,13 @@ data class UserDetail(
|
||||||
|
|
||||||
@Json(name = "created_at")
|
@Json(name = "created_at")
|
||||||
val createdAt: String
|
val createdAt: String
|
||||||
)
|
)
|
||||||
|
|
||||||
|
val UserDetail.fullSearchedAvatarUrl: Any
|
||||||
|
get() = if (SearchAvatarUrl.isNullOrBlank()) {
|
||||||
|
R.drawable.avatar_v1
|
||||||
|
} else if (SearchAvatarUrl.startsWith("http")) {
|
||||||
|
SearchAvatarUrl
|
||||||
|
} else {
|
||||||
|
"http://192.168.0.217$SearchAvatarUrl"
|
||||||
|
}
|
||||||
|
|
@ -70,6 +70,7 @@ import com.example.login_v3.data.api.api_class.fullPendingAvatarUrl
|
||||||
import com.example.login_v3.home.Message.ViewModel.Detail.ContactListViewModel
|
import com.example.login_v3.home.Message.ViewModel.Detail.ContactListViewModel
|
||||||
import com.example.login_v3.navigation.BottomBarViewModel
|
import com.example.login_v3.navigation.BottomBarViewModel
|
||||||
import androidx.compose.ui.text.input.ImeAction
|
import androidx.compose.ui.text.input.ImeAction
|
||||||
|
import com.example.login_v3.data.api.api_class.fullSearchedAvatarUrl
|
||||||
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
|
@ -421,7 +422,7 @@ fun SearchResultRow(
|
||||||
) {
|
) {
|
||||||
// 這裡放頭像
|
// 這裡放頭像
|
||||||
AsyncImage(
|
AsyncImage(
|
||||||
model = user.avatarUrl,
|
model = user.fullSearchedAvatarUrl,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
modifier = Modifier.size(40.dp).clip(CircleShape)
|
modifier = Modifier.size(40.dp).clip(CircleShape)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue