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 {