diff --git a/twidere/src/.google.commit-id b/twidere/src/.google.commit-id index f6d0d42fe..fcae871ac 100644 --- a/twidere/src/.google.commit-id +++ b/twidere/src/.google.commit-id @@ -1 +1 @@ -9ae153916806db7a16fffd9b76ef03d7ff4077a8 +175c0b448173e3f9431a19d761e24270cb3a1c62 diff --git a/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/StatusFragment.kt b/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/StatusFragment.kt index 7cead682d..01e12995c 100644 --- a/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/StatusFragment.kt +++ b/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/StatusFragment.kt @@ -1001,8 +1001,7 @@ class StatusFragment : BaseFragment(), LoaderCallbacks { - if (statusViewHolder != null) { - return statusViewHolder + if (detachedStatusViewHolder != null) { + return detachedStatusViewHolder } val view = inflater.inflate(R.layout.header_status_compact, parent, false) val cardView = view.findViewById(R.id.compact_card) @@ -1720,6 +1725,29 @@ class StatusFragment : BaseFragment(), LoaderCallbacks) { + var handled = false + when (holder.itemViewType) { + VIEW_TYPE_DETAIL_STATUS -> { + holder as DetailStatusViewHolder + payloads.forEach { it -> + when (it) { + is StatusActivity -> { + holder.updateStatusActivity(it) + } + is ParcelableStatus -> { + holder.displayStatus(statusAccount, status, statusActivity, + translationResult) + } + } + handled = true + } + } + } + if (handled) return + super.onBindViewHolder(holder, position, payloads) + } + override fun onBindViewHolder(holder: ViewHolder, position: Int) { when (holder.itemViewType) { VIEW_TYPE_DETAIL_STATUS -> { @@ -1758,14 +1786,14 @@ class StatusFragment : BaseFragment(), LoaderCallbacks