fix: 贴子点赞状态更新
This commit is contained in:
parent
d460b34ebb
commit
2ba6b9cc1c
|
|
@ -775,28 +775,19 @@ sealed interface ThreadPartialChange : PartialChange<ThreadUiState> {
|
||||||
return when (this) {
|
return when (this) {
|
||||||
is Start -> oldState.copy(
|
is Start -> oldState.copy(
|
||||||
threadInfo = oldState.threadInfo?.getImmutable {
|
threadInfo = oldState.threadInfo?.getImmutable {
|
||||||
updateCollectStatus(
|
updateAgreeStatus(hasAgree = if (hasAgree) 1 else 0)
|
||||||
newStatus = 0,
|
|
||||||
markPostId = 0
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
is Success -> oldState.copy(
|
is Success -> oldState.copy(
|
||||||
threadInfo = oldState.threadInfo?.getImmutable {
|
threadInfo = oldState.threadInfo?.getImmutable {
|
||||||
updateCollectStatus(
|
updateAgreeStatus(hasAgree = if (hasAgree) 1 else 0)
|
||||||
newStatus = 0,
|
|
||||||
markPostId = 0
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
is Failure -> oldState.copy(
|
is Failure -> oldState.copy(
|
||||||
threadInfo = oldState.threadInfo?.getImmutable {
|
threadInfo = oldState.threadInfo?.getImmutable {
|
||||||
updateCollectStatus(
|
updateAgreeStatus(hasAgree = if (hasAgree) 1 else 0)
|
||||||
newStatus = 0,
|
|
||||||
markPostId = 0
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue