fix: sửa lỗi notification và giao diện chat trên android

This commit is contained in:
2026-06-27 11:33:07 +07:00
parent ee42bfcefa
commit fee2aed2e6
68 changed files with 134 additions and 9 deletions
+10
View File
@@ -1,5 +1,6 @@
import { Capacitor } from '@capacitor/core';
import { GoogleAuth } from '@codetrix-studio/capacitor-google-auth';
import { LocalNotifications } from '@capacitor/local-notifications';
function rewriteUrls(obj: any, backendUrl: string): any {
if (obj === null || obj === undefined) return obj;
@@ -37,6 +38,15 @@ if (Capacitor.isNativePlatform()) {
console.error('[Native OAuth] Failed to initialize GoogleAuth client:', e);
}
// Request native local notification permission on startup
try {
LocalNotifications.requestPermissions().then(result => {
console.log('[LocalNotifications] Permissions requested:', result);
});
} catch (e) {
console.error('[LocalNotifications] Failed to request permissions:', e);
}
const backendUrl = import.meta.env.VITE_BACKEND_URL || 'https://yotrip.labz.io.vn';
const originalFetch = window.fetch;