Float onboarding story to top of the list.

This commit is contained in:
Alex Hart 2022-07-13 13:29:56 -03:00 committed by Cody Henthorne
parent 34379b8d3a
commit ecbc2d30ca

View file

@ -24,8 +24,8 @@ data class StoriesLandingItemData(
return when { return when {
storyRecipient.isMyStory && !other.storyRecipient.isMyStory -> -1 storyRecipient.isMyStory && !other.storyRecipient.isMyStory -> -1
!storyRecipient.isMyStory && other.storyRecipient.isMyStory -> 1 !storyRecipient.isMyStory && other.storyRecipient.isMyStory -> 1
storyRecipient.isReleaseNotes && !other.storyRecipient.isReleaseNotes -> 1 storyRecipient.isReleaseNotes && !other.storyRecipient.isReleaseNotes -> -1
!storyRecipient.isReleaseNotes && other.storyRecipient.isReleaseNotes -> -1 !storyRecipient.isReleaseNotes && other.storyRecipient.isReleaseNotes -> 1
storyViewState == StoryViewState.UNVIEWED && other.storyViewState != StoryViewState.UNVIEWED -> -1 storyViewState == StoryViewState.UNVIEWED && other.storyViewState != StoryViewState.UNVIEWED -> -1
storyViewState != StoryViewState.UNVIEWED && other.storyViewState == StoryViewState.UNVIEWED -> 1 storyViewState != StoryViewState.UNVIEWED && other.storyViewState == StoryViewState.UNVIEWED -> 1
else -> -dateInMilliseconds.compareTo(other.dateInMilliseconds) else -> -dateInMilliseconds.compareTo(other.dateInMilliseconds)