@@ -258,64 +258,66 @@ fun NumberDetailScreen(
258258 }
259259 }
260260
261- Row (modifier = Modifier .fillMaxWidth(), horizontalArrangement = Arrangement .spacedBy(8 .dp)) {
262- PremiumActionButton (
263- label = stringResource(if (isBlocked) R .string.detail_unblock else R .string.detail_block),
264- icon = if (isBlocked) Icons .Default .CheckCircle else Icons .Default .Block ,
265- color = CatRed ,
266- onClick = {
267- if (isBlocked) {
268- // By number, so a block saved in another spelling of it goes too.
269- viewModel.unblockByNumber(number)
270- hapticTick(context)
271- Toast .makeText(context, numberUnblockedMessage, Toast .LENGTH_SHORT ).show()
272- } else {
273- viewModel.blockNumber(number, " spam" , blockedFromDetail)
274- hapticConfirm(context)
275- Toast .makeText(context, numberBlockedMessage, Toast .LENGTH_SHORT ).show()
276- }
277- },
278- modifier = Modifier .weight(1f ),
279- )
280- PremiumActionButton (
281- label = stringResource(R .string.detail_report),
282- icon = Icons .Default .Flag ,
283- color = CatRed ,
284- onClick = {
285- val title = Uri .encode(reportIssueTitle)
286- val body = Uri .encode(reportIssueBody)
287- context.launchViewUrlSafely(" https://github.com/SysAdminDoc/CallShield/issues/new?title=$title &body=$body &labels=spam-report" )
288- },
289- modifier = Modifier .weight(1f ),
290- outlined = true ,
291- )
292- PremiumActionButton (
293- label = stringResource(R .string.detail_call),
294- icon = Icons .Default .Phone ,
295- color = CatText ,
296- onClick = {
297- context.startActivitySafely(
298- Intent (Intent .ACTION_DIAL , Uri .parse(" tel:$number " )).apply { addFlags(Intent .FLAG_ACTIVITY_NEW_TASK ) },
299- )
300- },
301- modifier = Modifier .weight(1f ),
302- outlined = true ,
303- )
304- }
305-
306- // Block area code — confirmed first: a ~7.9M-number rule from a stray
307- // tap with zero feedback is exactly what the Dashboard flow fixed in
308- // v1.7.26. Same dialog + toast here.
309261 var showAreaBlockConfirm by rememberSaveable { mutableStateOf(false ) }
310- if (areaCode != null ) {
311- PremiumActionButton (
312- label = stringResource(R .string.detail_block_area_code, areaCode),
313- icon = Icons .Default .FilterAlt ,
314- color = CatYellow ,
315- onClick = { showAreaBlockConfirm = true },
316- modifier = Modifier .fillMaxWidth(),
317- outlined = true ,
318- )
262+ PremiumCard {
263+ Column (modifier = Modifier .padding(16 .dp), verticalArrangement = Arrangement .spacedBy(12 .dp)) {
264+ SectionHeader (stringResource(R .string.detail_take_action), CatGreen )
265+ Text (stringResource(R .string.detail_take_action_desc), style = MaterialTheme .typography.bodySmall, color = CatSubtext )
266+ Row (modifier = Modifier .fillMaxWidth(), horizontalArrangement = Arrangement .spacedBy(8 .dp)) {
267+ PremiumActionButton (
268+ label = stringResource(if (isBlocked) R .string.detail_unblock else R .string.detail_block),
269+ icon = if (isBlocked) Icons .Default .CheckCircle else Icons .Default .Block ,
270+ color = CatRed ,
271+ onClick = {
272+ if (isBlocked) {
273+ // By number, so a block saved in another spelling of it goes too.
274+ viewModel.unblockByNumber(number)
275+ hapticTick(context)
276+ Toast .makeText(context, numberUnblockedMessage, Toast .LENGTH_SHORT ).show()
277+ } else {
278+ viewModel.blockNumber(number, " spam" , blockedFromDetail)
279+ hapticConfirm(context)
280+ Toast .makeText(context, numberBlockedMessage, Toast .LENGTH_SHORT ).show()
281+ }
282+ },
283+ modifier = Modifier .weight(1f ),
284+ )
285+ PremiumActionButton (
286+ label = stringResource(R .string.detail_report),
287+ icon = Icons .Default .Flag ,
288+ color = CatRed ,
289+ onClick = {
290+ val title = Uri .encode(reportIssueTitle)
291+ val body = Uri .encode(reportIssueBody)
292+ context.launchViewUrlSafely(" https://github.com/SysAdminDoc/CallShield/issues/new?title=$title &body=$body &labels=spam-report" )
293+ },
294+ modifier = Modifier .weight(1f ),
295+ outlined = true ,
296+ )
297+ PremiumActionButton (
298+ label = stringResource(R .string.detail_call),
299+ icon = Icons .Default .Phone ,
300+ color = CatText ,
301+ onClick = {
302+ context.startActivitySafely(
303+ Intent (Intent .ACTION_DIAL , Uri .parse(" tel:$number " )).apply { addFlags(Intent .FLAG_ACTIVITY_NEW_TASK ) },
304+ )
305+ },
306+ modifier = Modifier .weight(1f ),
307+ outlined = true ,
308+ )
309+ }
310+ if (areaCode != null ) {
311+ PremiumActionButton (
312+ label = stringResource(R .string.detail_block_area_code, areaCode),
313+ icon = Icons .Default .FilterAlt ,
314+ color = CatYellow ,
315+ onClick = { showAreaBlockConfirm = true },
316+ modifier = Modifier .fillMaxWidth(),
317+ outlined = true ,
318+ )
319+ }
320+ }
319321 }
320322 if (showAreaBlockConfirm && areaCode != null ) {
321323 val areaAddedToast = stringResource(R .string.dashboard_block_area_added, areaCode)
0 commit comments