Fix stories viewed not updating in UI.
This commit is contained in:
parent
4d028d1867
commit
9fbc7c0f65
2 changed files with 4 additions and 3 deletions
|
@ -445,6 +445,7 @@ public class MmsDatabase extends MessageDatabase {
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
notifyConversationListeners(threadsUpdated);
|
notifyConversationListeners(threadsUpdated);
|
||||||
|
notifyConversationListListeners();
|
||||||
|
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@ import com.bumptech.glide.request.target.Target
|
||||||
import org.thoughtcrime.securesms.R
|
import org.thoughtcrime.securesms.R
|
||||||
import org.thoughtcrime.securesms.avatar.view.AvatarView
|
import org.thoughtcrime.securesms.avatar.view.AvatarView
|
||||||
import org.thoughtcrime.securesms.badges.BadgeImageView
|
import org.thoughtcrime.securesms.badges.BadgeImageView
|
||||||
import org.thoughtcrime.securesms.components.settings.PreferenceModel
|
|
||||||
import org.thoughtcrime.securesms.database.model.MediaMmsMessageRecord
|
import org.thoughtcrime.securesms.database.model.MediaMmsMessageRecord
|
||||||
import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader
|
import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader
|
||||||
import org.thoughtcrime.securesms.mms.GlideApp
|
import org.thoughtcrime.securesms.mms.GlideApp
|
||||||
|
@ -24,6 +23,7 @@ import org.thoughtcrime.securesms.util.DateUtils
|
||||||
import org.thoughtcrime.securesms.util.SpanUtil
|
import org.thoughtcrime.securesms.util.SpanUtil
|
||||||
import org.thoughtcrime.securesms.util.adapter.mapping.LayoutFactory
|
import org.thoughtcrime.securesms.util.adapter.mapping.LayoutFactory
|
||||||
import org.thoughtcrime.securesms.util.adapter.mapping.MappingAdapter
|
import org.thoughtcrime.securesms.util.adapter.mapping.MappingAdapter
|
||||||
|
import org.thoughtcrime.securesms.util.adapter.mapping.MappingModel
|
||||||
import org.thoughtcrime.securesms.util.adapter.mapping.MappingViewHolder
|
import org.thoughtcrime.securesms.util.adapter.mapping.MappingViewHolder
|
||||||
import org.thoughtcrime.securesms.util.visible
|
import org.thoughtcrime.securesms.util.visible
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
@ -48,7 +48,7 @@ object StoriesLandingItem {
|
||||||
val onGoToChat: (Model) -> Unit,
|
val onGoToChat: (Model) -> Unit,
|
||||||
val onSave: (Model) -> Unit,
|
val onSave: (Model) -> Unit,
|
||||||
val onDeleteStory: (Model) -> Unit
|
val onDeleteStory: (Model) -> Unit
|
||||||
) : PreferenceModel<Model>() {
|
) : MappingModel<Model> {
|
||||||
override fun areItemsTheSame(newItem: Model): Boolean {
|
override fun areItemsTheSame(newItem: Model): Boolean {
|
||||||
return data.storyRecipient.id == newItem.data.storyRecipient.id
|
return data.storyRecipient.id == newItem.data.storyRecipient.id
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ object StoriesLandingItem {
|
||||||
data == newItem.data &&
|
data == newItem.data &&
|
||||||
!hasStatusChange(newItem) &&
|
!hasStatusChange(newItem) &&
|
||||||
(data.sendingCount == newItem.data.sendingCount && data.failureCount == newItem.data.failureCount) &&
|
(data.sendingCount == newItem.data.sendingCount && data.failureCount == newItem.data.failureCount) &&
|
||||||
super.areContentsTheSame(newItem)
|
data.storyViewState == newItem.data.storyViewState
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getChangePayload(newItem: Model): Any? {
|
override fun getChangePayload(newItem: Model): Any? {
|
||||||
|
|
Loading…
Add table
Reference in a new issue