From 31da57d218d209098a3caaec1025aaefba7c3fd0 Mon Sep 17 00:00:00 2001 From: Ramadhan Sjamsani Date: Thu, 21 May 2026 19:32:46 +0800 Subject: [PATCH] Mitra Profil: drop handle subtitle on WA/TG rows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- mitra_app/lib/features/profile/profil_screen.dart | 8 -------- .../lib/features/profile/support_handles_provider.dart | 10 ---------- 2 files changed, 18 deletions(-) diff --git a/mitra_app/lib/features/profile/profil_screen.dart b/mitra_app/lib/features/profile/profil_screen.dart index b70fd7c..887a090 100644 --- a/mitra_app/lib/features/profile/profil_screen.dart +++ b/mitra_app/lib/features/profile/profil_screen.dart @@ -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), diff --git a/mitra_app/lib/features/profile/support_handles_provider.dart b/mitra_app/lib/features/profile/support_handles_provider.dart index 3bd4122..86dec9a 100644 --- a/mitra_app/lib/features/profile/support_handles_provider.dart +++ b/mitra_app/lib/features/profile/support_handles_provider.dart @@ -11,16 +11,6 @@ class SupportHandle { label: json['label'] as String? ?? '', deeplink: json['deeplink'] as String? ?? '', ); - - /// Display form for the menu subtitle: strip the URL scheme so - /// "https://wa.me/6285173310010" → "wa.me/6285173310010" and - /// "https://t.me/halobestie" → "t.me/halobestie". Falls back to the - /// raw deeplink when there's no scheme to strip. - String get displayHandle { - if (deeplink.isEmpty) return ''; - final stripped = deeplink.replaceFirst(RegExp(r'^https?://'), ''); - return stripped; - } } class SupportHandles {