更新 token 刷新

新增 token 刷新功能,包括 API 接口和拦截器逻辑。
This commit is contained in:
2024-08-31 23:49:15 +08:00
parent 98430f3282
commit 091926a3c1
6 changed files with 66 additions and 25 deletions

View File

@@ -56,15 +56,15 @@ fun CustomAsyncImage(
contentScale: ContentScale = ContentScale.Crop
) {
val imageLoader = getImageLoader(context)
val blurBitmap = remember(blurHash) {
blurHash?.let {
BlurHashDecoder.decode(
blurHash = it,
width = DEFAULT_HASHED_BITMAP_WIDTH,
height = DEFAULT_HASHED_BITMAP_HEIGHT
)
}
}
// val blurBitmap = remember(blurHash) {
// blurHash?.let {
// BlurHashDecoder.decode(
// blurHash = it,
// width = DEFAULT_HASHED_BITMAP_WIDTH,
// height = DEFAULT_HASHED_BITMAP_HEIGHT
// )
// }
// }
// var bitmap by remember(imageUrl) { mutableStateOf<Bitmap?>(null) }
//
@@ -86,16 +86,6 @@ fun CustomAsyncImage(
model = ImageRequest.Builder(context)
.data(imageUrl)
.crossfade(200)
.apply {
if (placeholderRes != null) {
placeholder(placeholderRes)
return@apply
}
if (blurBitmap != null) {
placeholder(blurBitmap.toDrawable(context.resources))
}
}
.build(),
contentDescription = contentDescription,
modifier = modifier,