A cheap attempt at a native Bluesky client for Android

Notifications: Label reply and mention notifications

Add "Replied to you" and "Mentioned you" labels to the corresponding notification types. This is achieved by passing new boolean flags, `renderingReplyNotif` and `renderingMention`, from the `NotificationsView` to the `SkeetView`.

+40 -3
+3 -1
app/src/main/java/industries/geesawra/monarch/NotificationsView.kt
··· 173 173 skeet = SkeetData.fromPost( 174 174 notification.parent, 175 175 notification.mention, 176 - notification.author 176 + notification.author, 177 177 ), 178 178 onReplyTap = onReplyTap, 179 + renderingMention = true, 179 180 ) 180 181 181 182 is Notification.Quote -> SkeetView( ··· 197 198 notification.author 198 199 ), 199 200 onReplyTap = onReplyTap, 201 + renderingReplyNotif = true, 200 202 ) 201 203 202 204 is Notification.Repost -> LikeRepostRowView(
+37 -2
app/src/main/java/industries/geesawra/monarch/SkeetView.kt
··· 72 72 inThread: Boolean = false, 73 73 showInReplyTo: Boolean = true, 74 74 showLabels: Boolean = true, 75 + renderingReplyNotif: Boolean = false, 76 + renderingMention: Boolean = false, 75 77 onShowThread: (SkeetData) -> Unit = {}, 76 78 ) { 77 79 if (skeet.blocked) { ··· 108 110 .sizeIn(minHeight = minSize), 109 111 ) { 110 112 111 - SkeetReason(modifier = Modifier.padding(start = 4.dp), skeet = skeet, showInReplyTo) 113 + SkeetReason( 114 + modifier = Modifier.padding(start = 4.dp), 115 + skeet = skeet, 116 + showInReplyTo, 117 + renderingReplyNotif, 118 + renderingMention 119 + ) 112 120 113 121 Row( 114 122 modifier = Modifier ··· 425 433 private fun SkeetReason( 426 434 modifier: Modifier = Modifier, 427 435 skeet: SkeetData, 428 - showInReplyTo: Boolean = true 436 + showInReplyTo: Boolean = true, 437 + renderingReplyNotif: Boolean = false, 438 + renderingMention: Boolean = false, 429 439 ) { 430 440 Column(modifier = modifier) { 441 + if (renderingMention) { 442 + Text( 443 + text = "Mentioned you", 444 + color = MaterialTheme.colorScheme.onSurfaceVariant, 445 + style = MaterialTheme.typography.labelMedium, 446 + modifier = Modifier 447 + .fillMaxSize() 448 + .padding(bottom = 4.dp), 449 + fontWeight = FontWeight.Bold 450 + ) 451 + return@Column 452 + } 453 + if (renderingReplyNotif) { 454 + Text( 455 + text = "Replied to you", 456 + color = MaterialTheme.colorScheme.onSurfaceVariant, 457 + style = MaterialTheme.typography.labelMedium, 458 + modifier = Modifier 459 + .fillMaxSize() 460 + .padding(bottom = 4.dp), 461 + fontWeight = FontWeight.Bold 462 + ) 463 + return@Column 464 + } 465 + 431 466 var isRepost = false 432 467 skeet.reason?.let { 433 468 it