|
|
|
@ -63,15 +63,14 @@ export default function QuestionsListClient() { |
|
|
|
// entries. Flutter calls __habibHandleHardwareBack() and we return false
|
|
|
|
// (meaning "I didn't handle it — you should close").
|
|
|
|
useHardwareBackHandler(() => { |
|
|
|
if (isOptionalInfoSheetOpen) { |
|
|
|
setIsOptionalInfoSheetOpen(false); |
|
|
|
return true; // Handled: closed the tips sheet
|
|
|
|
} |
|
|
|
if (activeSectionSlug) { |
|
|
|
handleCloseSection(); |
|
|
|
return true; // Handled: closed the section sheet, do not close WebView
|
|
|
|
} |
|
|
|
if (typeof window !== "undefined" && (window as any).HabibApp?.postMessage) { |
|
|
|
(window as any).HabibApp.postMessage( |
|
|
|
JSON.stringify({ action: "close_service" }), |
|
|
|
); |
|
|
|
} |
|
|
|
return false; // Tell Flutter to close the WebView screen
|
|
|
|
}); |
|
|
|
const { dictionary: t, locale } = useI18n(); |
|
|
|
|