A cheap attempt at a native Bluesky client for Android

Models: no really, if it's a repost or pin, always show

+13 -10
+13 -10
app/src/main/java/industries/geesawra/monarch/datalayer/Models.kt
··· 74 74 ) 75 75 76 76 sd.replyToNotFollowing = { 77 - val (parent, _) = sd.parent() 78 - val root = sd.root() 77 + when (sd.reason) { 78 + is FeedViewPostReasonUnion.ReasonPin -> false 79 + is FeedViewPostReasonUnion.ReasonRepost -> false 80 + is FeedViewPostReasonUnion.Unknown -> false 81 + else -> { 82 + val (parent, _) = sd.parent() 83 + val root = sd.root() 84 + 85 + val parentFollowing = parent?.following ?: false 86 + val rootFollowing = root?.following ?: false 79 87 80 - if (parent == null) { 81 - false // simple posts, reposts etc should always go through 88 + val res = parentFollowing && rootFollowing 89 + !res 90 + } 82 91 } 83 - 84 - val parentFollowing = parent?.following ?: false 85 - val rootFollowing = root?.following ?: false 86 - 87 - val res = parentFollowing && rootFollowing 88 - !res 89 92 }() 90 93 91 94 return sd