mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-09 21:02:33 +02:00
Avoids triggering the Notification bubble when the live event is simply updated.
This commit is contained in:
@@ -62,7 +62,7 @@ open class DiscoverLiveFeedFilter(val account: Account) : AdditiveFeedFilter<Not
|
|||||||
compareBy(
|
compareBy(
|
||||||
{ convertStatusToOrder((it.event as? LiveActivitiesEvent)?.status()) },
|
{ convertStatusToOrder((it.event as? LiveActivitiesEvent)?.status()) },
|
||||||
{ counter.countFollowsThatParticipateOn(it, followingKeySet) },
|
{ counter.countFollowsThatParticipateOn(it, followingKeySet) },
|
||||||
{ it.createdAt() },
|
{ (it.event as? LiveActivitiesEvent)?.starts() ?: it.createdAt() },
|
||||||
{ it.idHex }
|
{ it.idHex }
|
||||||
)
|
)
|
||||||
).reversed()
|
).reversed()
|
||||||
|
@@ -14,6 +14,7 @@ import com.vitorpamplona.amethyst.R
|
|||||||
import com.vitorpamplona.amethyst.model.Account
|
import com.vitorpamplona.amethyst.model.Account
|
||||||
import com.vitorpamplona.amethyst.model.Note
|
import com.vitorpamplona.amethyst.model.Note
|
||||||
import com.vitorpamplona.amethyst.service.checkNotInMainThread
|
import com.vitorpamplona.amethyst.service.checkNotInMainThread
|
||||||
|
import com.vitorpamplona.amethyst.service.model.LiveActivitiesEvent
|
||||||
import com.vitorpamplona.amethyst.service.model.PrivateDmEvent
|
import com.vitorpamplona.amethyst.service.model.PrivateDmEvent
|
||||||
import com.vitorpamplona.amethyst.ui.dal.AdditiveFeedFilter
|
import com.vitorpamplona.amethyst.ui.dal.AdditiveFeedFilter
|
||||||
import com.vitorpamplona.amethyst.ui.dal.ChatroomListKnownFeedFilter
|
import com.vitorpamplona.amethyst.ui.dal.ChatroomListKnownFeedFilter
|
||||||
@@ -205,7 +206,15 @@ object DiscoverLatestItem : LatestItem() {
|
|||||||
|
|
||||||
val newestItem = updateNewestItem(newNotes, account, DiscoverLiveNowFeedFilter(account))
|
val newestItem = updateNewestItem(newNotes, account, DiscoverLiveNowFeedFilter(account))
|
||||||
|
|
||||||
return (newestItem?.createdAt() ?: 0) > lastTime
|
val noteEvent = newestItem?.event
|
||||||
|
|
||||||
|
val dateToUse = if (noteEvent is LiveActivitiesEvent) {
|
||||||
|
noteEvent.starts() ?: newestItem.createdAt()
|
||||||
|
} else {
|
||||||
|
newestItem?.createdAt()
|
||||||
|
}
|
||||||
|
|
||||||
|
return (dateToUse ?: 0) > lastTime
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user