Mitra Profil: drop handle subtitle on WA/TG rows
User feedback — the wa.me/... and t.me/... subtitles under "Chat WhatsApp Kami" / "Chat Telegram Kami" leaked the raw URL into the UI. Just the label now, matching how typical "contact us" menu entries read. Tap still launches the deeplink from backend config. Drop the unused `SupportHandle.displayHandle` getter that produced the scheme-stripped subtitle — no other call site. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -47,7 +47,6 @@ class ProfilScreen extends ConsumerWidget {
|
||||
_ProfileCard(displayName: displayName, phone: phone),
|
||||
const SizedBox(height: 28),
|
||||
_MenuList(
|
||||
handles: handlesAsync.valueOrNull,
|
||||
onTapWa: () => _launchHandle(context, handlesAsync.valueOrNull?.wa),
|
||||
onTapTelegram: () => _launchHandle(context, handlesAsync.valueOrNull?.telegram),
|
||||
onTapTerms: () => _snack(context, 'Segera tersedia'),
|
||||
@@ -239,14 +238,12 @@ class _ProfileCard extends StatelessWidget {
|
||||
|
||||
// ─── Menu list — WA + Telegram + Terms + Privacy ─────────────────────────
|
||||
class _MenuList extends StatelessWidget {
|
||||
final SupportHandles? handles;
|
||||
final VoidCallback onTapWa;
|
||||
final VoidCallback onTapTelegram;
|
||||
final VoidCallback onTapTerms;
|
||||
final VoidCallback onTapPrivacy;
|
||||
|
||||
const _MenuList({
|
||||
required this.handles,
|
||||
required this.onTapWa,
|
||||
required this.onTapTelegram,
|
||||
required this.onTapTerms,
|
||||
@@ -255,22 +252,17 @@ class _MenuList extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final waSub = handles?.wa?.displayHandle ?? '';
|
||||
final tgSub = handles?.telegram?.displayHandle ?? '';
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
_MenuTile(
|
||||
icon: Icons.chat_bubble_outline,
|
||||
label: 'Chat WhatsApp Kami',
|
||||
subtitle: waSub.isEmpty ? null : waSub,
|
||||
onTap: onTapWa,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
_MenuTile(
|
||||
icon: Icons.send_outlined,
|
||||
label: 'Chat Telegram Kami',
|
||||
subtitle: tgSub.isEmpty ? null : tgSub,
|
||||
onTap: onTapTelegram,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
|
||||
Reference in New Issue
Block a user