更新图片缓存
调整图片加载库的缓存策略,启用默认的内存和磁盘缓存。
This commit is contained in:
@@ -123,9 +123,6 @@ object PostViewModel : ViewModel() {
|
||||
fun preTransit(momentEntity: MomentEntity?) {
|
||||
this.postId = momentEntity?.id.toString()
|
||||
this.moment = momentEntity
|
||||
this._commentsFlow = MutableStateFlow<PagingData<CommentEntity>>(PagingData.empty())
|
||||
this.accountProfileEntity = null
|
||||
|
||||
viewModelScope.launch {
|
||||
Pager(
|
||||
config = PagingConfig(pageSize = 5, enablePlaceholders = false),
|
||||
@@ -348,7 +345,6 @@ fun PostScreen(
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
|
||||
) {
|
||||
CommentsSection(
|
||||
lazyPagingItems = commentsPagging,
|
||||
@@ -588,8 +584,8 @@ fun CommentItem(commentEntity: CommentEntity, onLike: () -> Unit = {}) {
|
||||
Column {
|
||||
Row(modifier = Modifier.padding(vertical = 8.dp)) {
|
||||
CustomAsyncImage(
|
||||
context,
|
||||
commentEntity.avatar,
|
||||
context = context,
|
||||
imageUrl = commentEntity.avatar,
|
||||
contentDescription = "Comment Profile Picture",
|
||||
modifier = Modifier
|
||||
.size(40.dp)
|
||||
|
||||
Reference in New Issue
Block a user