- Move and replace utility files (SafariUtil, SpeechQueue, StringExtensions, TTSManager, VoiceManager) - Refactor and extend SpeechPlayer components (UI, progress, volume, queue) - Improved state and EnvironmentObject management (PlayerUIState) - UI and logic optimizations in menu and tab views - Remove obsolete and duplicate files - General code and UX improvements
30 lines
665 B
Swift
30 lines
665 B
Swift
import SwiftUI
|
|
import Foundation
|
|
|
|
struct MainTabView: View {
|
|
@State private var selectedTab: SidebarTab = .unread
|
|
@State var selectedBookmark: Bookmark?
|
|
@StateObject private var playerUIState = PlayerUIState()
|
|
|
|
// sizeClass
|
|
@Environment(\.horizontalSizeClass)
|
|
var horizontalSizeClass
|
|
|
|
@Environment(\.verticalSizeClass)
|
|
var verticalSizeClass
|
|
|
|
var body: some View {
|
|
if UIDevice.isPhone {
|
|
PhoneTabView()
|
|
.environmentObject(playerUIState)
|
|
} else {
|
|
PadSidebarView()
|
|
.environmentObject(playerUIState)
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
MainTabView()
|
|
}
|