···532532}
533533534534sealed class Notification {
535535- data class RawLike(val post: Post, val author: ProfileView, val createdAt: Instant) :
535535+ data class RawLike(
536536+ val post: Post,
537537+ val author: ProfileView,
538538+ val createdAt: Instant,
539539+ val new: Boolean
540540+ ) :
536541 Notification()
537542538538- data class RawRepost(val post: Post, val author: ProfileView, val createdAt: Instant) :
543543+ data class RawRepost(
544544+ val post: Post,
545545+ val author: ProfileView,
546546+ val createdAt: Instant,
547547+ val new: Boolean
548548+ ) :
539549 Notification()
540550541541- data class Like(val data: RepeatedNotification) :
551551+ data class Like(val data: RepeatedNotification, val new: Boolean) :
542552 Notification()
543553544544- data class Repost(val data: RepeatedNotification) :
554554+ data class Repost(val data: RepeatedNotification, val new: Boolean) :
545555 Notification()
546556547557 data class Reply(
548558 val parent: Pair<Cid, AtUri>,
549559 val reply: Post,
550560 val author: ProfileView,
551551- val createdAt: Instant
561561+ val createdAt: Instant,
562562+ val new: Boolean
552563 ) :
553564 Notification()
554565555555- data class Follow(val follow: ProfileView, val createdAt: Instant) : Notification()
566566+ data class Follow(val follow: ProfileView, val createdAt: Instant, val new: Boolean) :
567567+ Notification()
568568+556569 data class Mention(
557570 val parent: Pair<Cid, AtUri>,
558571 val mention: Post,
559572 val author: ProfileView,
560560- val createdAt: Instant
573573+ val createdAt: Instant,
574574+ val new: Boolean
561575 ) :
562576 Notification()
563577···565579 val parent: Pair<Cid, AtUri>,
566580 val quote: Post,
567581 val author: ProfileView,
568568- val createdAt: Instant
582582+ val createdAt: Instant,
583583+ val new: Boolean
569584 ) :
570585 Notification()
571586···581596 is Repost -> this.data.timestamp
582597 }
583598 }
599599+600600+ fun new(): Boolean {
601601+ return when (this) {
602602+ is RawLike -> this.new
603603+ is RawRepost -> this.new
604604+ is Follow -> this.new
605605+ is Like -> this.new
606606+ is Mention -> this.new
607607+ is Quote -> this.new
608608+ is Reply -> this.new
609609+ is Repost -> this.new
610610+ }
611611+ }
584612}
585613586614···593621 val kind: RepeatableNotification,
594622 val post: Post,
595623 var authors: List<RepeatedAuthor>,
596596- var timestamp: Instant
624624+ var timestamp: Instant,
625625+ val new: Boolean,
597626) {
598627 fun sorted(): RepeatedNotification {
599628 return this.copy(kind, post, authors.sortedByDescending { it.timestamp }, timestamp)
···603632data class RepeatedAuthor(
604633 val author: ProfileView,
605634 val timestamp: Instant,
635635+)
636636+637637+data class ThreadPost(
638638+ val post: SkeetData,
639639+ val replies: List<ThreadPost>
606640)