A cheap attempt at a native Bluesky client for Android

Timeline: Simplify repost notification logic

Removes unnecessary logic for fetching the embedded record in a repost notification. The reposted post (`rpp`) is already available and can be used directly.

+1 -18
+1 -18
app/src/main/java/industries/geesawra/monarch/datalayer/TimelineViewModel.kt
··· 15 15 import app.bsky.feed.GetPostThreadResponseThreadUnion 16 16 import app.bsky.feed.Like 17 17 import app.bsky.feed.Post 18 - import app.bsky.feed.PostEmbedUnion 19 18 import app.bsky.feed.PostReplyRef 20 19 import app.bsky.feed.Repost 21 20 import app.bsky.feed.ThreadViewPostReplieUnion ··· 287 286 ListNotificationsReason.Repost -> { 288 287 val p: Repost = it.record.decodeAs() 289 288 val rpp = posts[p.subject.uri]!! 290 - 291 - val pp = when (rpp.embed) { 292 - is PostEmbedUnion.Record -> { 293 - fetchRecord((rpp.embed as PostEmbedUnion.Record).value.record.uri).getOrThrow() 294 - .decodeAs() 295 - 296 - } 297 - 298 - is PostEmbedUnion.RecordWithMedia -> { 299 - fetchRecord((rpp.embed as PostEmbedUnion.RecordWithMedia).value.record.record.uri).getOrThrow() 300 - .decodeAs() 301 - } 302 - 303 - else -> rpp 304 - } 305 - 306 289 repeatable += Notification.RawRepost( 307 - pp, 290 + rpp, 308 291 it.author, 309 292 p.createdAt.toStdlibInstant() 310 293 )