fix: 贴子一楼图片无法点击打开
This commit is contained in:
parent
fb77b4b6d2
commit
fd7f273277
|
|
@ -308,7 +308,8 @@ val Post.contentRenders: ImmutableList<PbContentRender>
|
||||||
|
|
||||||
return renders.map {
|
return renders.map {
|
||||||
if (it is PicContentRender) {
|
if (it is PicContentRender) {
|
||||||
val data = getPhotoViewData(
|
it.copy(
|
||||||
|
photoViewData = getPhotoViewData(
|
||||||
this,
|
this,
|
||||||
it.picId,
|
it.picId,
|
||||||
it.picUrl,
|
it.picUrl,
|
||||||
|
|
@ -316,7 +317,7 @@ val Post.contentRenders: ImmutableList<PbContentRender>
|
||||||
it.showOriginBtn,
|
it.showOriginBtn,
|
||||||
it.originSize
|
it.originSize
|
||||||
)
|
)
|
||||||
if (data != null) it.copy(photoViewData = data) else it
|
)
|
||||||
} else it
|
} else it
|
||||||
}.toImmutableList()
|
}.toImmutableList()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1114,9 +1114,9 @@ data class ThreadUiState(
|
||||||
) : UiState
|
) : UiState
|
||||||
|
|
||||||
sealed interface ThreadUiEvent : UiEvent {
|
sealed interface ThreadUiEvent : UiEvent {
|
||||||
object ScrollToFirstReply : ThreadUiEvent
|
data object ScrollToFirstReply : ThreadUiEvent
|
||||||
|
|
||||||
object ScrollToLatestReply : ThreadUiEvent
|
data object ScrollToLatestReply : ThreadUiEvent
|
||||||
|
|
||||||
data class LoadSuccess(
|
data class LoadSuccess(
|
||||||
val page: Int
|
val page: Int
|
||||||
|
|
@ -1124,7 +1124,7 @@ sealed interface ThreadUiEvent : UiEvent {
|
||||||
|
|
||||||
data class AddFavoriteSuccess(val floor: Int) : ThreadUiEvent
|
data class AddFavoriteSuccess(val floor: Int) : ThreadUiEvent
|
||||||
|
|
||||||
object RemoveFavoriteSuccess : ThreadUiEvent
|
data object RemoveFavoriteSuccess : ThreadUiEvent
|
||||||
}
|
}
|
||||||
|
|
||||||
object ThreadSortType {
|
object ThreadSortType {
|
||||||
|
|
|
||||||
|
|
@ -276,20 +276,17 @@ fun NetworkImage(
|
||||||
|
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.pointerInput(Unit) {
|
.pointerInput(enableClick) {
|
||||||
if (enableClick) {
|
if (enableClick) {
|
||||||
detectTapGestures(
|
detectTapGestures(
|
||||||
onLongPress = {
|
onLongPress = {
|
||||||
isLongPressing = true
|
isLongPressing = true
|
||||||
},
|
},
|
||||||
onPress = {
|
onPress = {
|
||||||
awaitRelease()
|
tryAwaitRelease()
|
||||||
isLongPressing = false
|
isLongPressing = false
|
||||||
},
|
},
|
||||||
onTap = {
|
onTap = {
|
||||||
if (isLongPressing) {
|
|
||||||
return@detectTapGestures
|
|
||||||
}
|
|
||||||
if (!shouldLoad) {
|
if (!shouldLoad) {
|
||||||
shouldLoad = true
|
shouldLoad = true
|
||||||
} else if (photoViewData != null) {
|
} else if (photoViewData != null) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue