Fix 3 critical bugs: WebView navbar, Android STT, Speaker icon

1. WebView Dashboard Navbar
   - Add `localStorage.setItem('is_mobile', '1')` to hide nav bar
   - Fixes issue where web dashboard shows full navigation

2. Android STT Restart After TTS
   - Reduce delay from 300ms to 50ms for Android
   - Android Audio Focus releases immediately after TTS ends
   - iOS keeps 300ms delay for smooth audio fade
   - File: app/(tabs)/_layout.tsx:208

3. Remove Speaker Icon from Chat Header
   - Remove TTS Stop button (volume-high icon) from chat.tsx
   - Not needed in Lite version
   - File: app/(tabs)/chat.tsx:500-508

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Sergei 2026-01-29 09:08:11 -08:00
parent 8c0e36cae3
commit 3ec0f5dae2
3 changed files with 8 additions and 10 deletions

View File

@ -203,11 +203,14 @@ export default function TabLayout() {
} }
// Delay to let TTS fully release audio focus, then restart STT // Delay to let TTS fully release audio focus, then restart STT
// iOS: 300ms for smooth audio fade
// Android: 50ms (Audio Focus releases immediately)
const delay = Platform.OS === 'android' ? 50 : 300;
const timer = setTimeout(() => { const timer = setTimeout(() => {
if (sessionActiveRef.current) { if (sessionActiveRef.current) {
safeStartSTT(); safeStartSTT();
} }
}, 300); // 300ms to ensure TTS audio fully fades }, delay);
return () => clearTimeout(timer); return () => clearTimeout(timer);
} }

View File

@ -497,15 +497,6 @@ export default function ChatScreen() {
</Text> </Text>
</View> </View>
</View> </View>
{/* TTS Stop button - only visible when speaking */}
{isSpeaking && (
<TouchableOpacity
style={[styles.headerButton, styles.speakingButton]}
onPress={stopTTS}
>
<Ionicons name="volume-high" size={22} color={AppColors.primary} />
</TouchableOpacity>
)}
<TouchableOpacity <TouchableOpacity
style={styles.headerButton} style={styles.headerButton}
onPress={() => setSortNewestFirst(prev => !prev)} onPress={() => setSortNewestFirst(prev => !prev)}

View File

@ -149,6 +149,10 @@ export default function HomeScreen() {
user_id: ${userId || 'null'} user_id: ${userId || 'null'}
}; };
localStorage.setItem('auth2', JSON.stringify(authData)); localStorage.setItem('auth2', JSON.stringify(authData));
// Set is_mobile flag to hide navigation bar
localStorage.setItem('is_mobile', '1');
console.log('Auth injected:', authData.username); console.log('Auth injected:', authData.username);
// Monitor page content for session expired messages // Monitor page content for session expired messages