fix(chat): scope keyboard fallback to Xiaomi Facebook IAB

This commit is contained in:
2026-06-24 15:40:16 +08:00
parent 08c954903f
commit a229dcf7d1
2 changed files with 17 additions and 5 deletions
+6
View File
@@ -85,6 +85,12 @@ export class PlatformDetector {
return PlatformDetector.getPlatformInfo(ua).isDesktop;
}
static isXiaomiFamilyDevice(ua: string | null = null): boolean {
const info = PlatformDetector.getPlatformInfo(ua);
const target = `${info.deviceVendor} ${info.deviceModel} ${info.userAgent}`;
return /\b(Xiaomi|Redmi|POCO|Mi\s|MIX|MIUI)\b/i.test(target);
}
private static getUserAgent(ua: string | null = null): string {
if (ua) return ua;
if (typeof navigator === "undefined") return "";