From 385dbbbef211b61b377c86264aafe79d4f134c6f Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Sun, 11 Dec 2022 16:15:42 +0100 Subject: [PATCH] Typo fix --- .../Subscriptions => Model}/FeedModel.swift | 4 ++-- Model/NavigationModel.swift | 2 +- ...el.swift => SubscribedChannelsModel.swift} | 8 +++---- .../Navigation/AppSidebarSubscriptions.swift | 2 +- Shared/Navigation/AppTabNavigation.swift | 2 +- Shared/Navigation/ContentView.swift | 2 +- .../Player/AppleAVPlayerViewController.swift | 2 +- Shared/Player/Video Details/CommentView.swift | 2 +- .../Player/Video Details/VideoActions.swift | 2 +- Shared/Subscriptions/ChannelsView.swift | 2 +- Shared/Views/ChannelVideosView.swift | 2 +- Shared/Views/ControlsBar.swift | 2 +- Shared/Views/VideoContextMenuView.swift | 2 +- Shared/YatteeApp.swift | 2 +- Yattee.xcodeproj/project.pbxproj | 22 +++++++++---------- 15 files changed, 29 insertions(+), 29 deletions(-) rename {Shared/Subscriptions => Model}/FeedModel.swift (97%) rename Model/{SubsribedChannelsModel.swift => SubscribedChannelsModel.swift} (95%) diff --git a/Shared/Subscriptions/FeedModel.swift b/Model/FeedModel.swift similarity index 97% rename from Shared/Subscriptions/FeedModel.swift rename to Model/FeedModel.swift index f872f10d..2af207db 100644 --- a/Shared/Subscriptions/FeedModel.swift +++ b/Model/FeedModel.swift @@ -18,7 +18,7 @@ final class FeedModel: ObservableObject { DispatchQueue.global(qos: .background).async { [weak self] in guard let self else { return } - if !force { + if force || self.videos.isEmpty { self.loadCachedFeed() } @@ -117,7 +117,7 @@ final class FeedModel: ObservableObject { guard let account = accounts.current else { return } let cache = FeedCacheModel.shared.retrieveFeed(account: account) if !cache.isEmpty { - DispatchQueue.main.async { [weak self] in + DispatchQueue.main.async(qos: .userInteractive) { [weak self] in self?.videos = cache } } diff --git a/Model/NavigationModel.swift b/Model/NavigationModel.swift index 0b9f638b..624a6f95 100644 --- a/Model/NavigationModel.swift +++ b/Model/NavigationModel.swift @@ -221,7 +221,7 @@ final class NavigationModel: ObservableObject { presentingPlaylistForm = true } - func presentUnsubscribeAlert(_ channel: Channel, subscriptions: SubsribedChannelsModel) { + func presentUnsubscribeAlert(_ channel: Channel, subscriptions: SubscribedChannelsModel) { channelToUnsubscribe = channel alert = Alert( title: Text( diff --git a/Model/SubsribedChannelsModel.swift b/Model/SubscribedChannelsModel.swift similarity index 95% rename from Model/SubsribedChannelsModel.swift rename to Model/SubscribedChannelsModel.swift index f3daa28d..ef5bef2f 100644 --- a/Model/SubsribedChannelsModel.swift +++ b/Model/SubscribedChannelsModel.swift @@ -5,16 +5,16 @@ import Siesta import SwiftUI import SwiftyJSON -final class SubsribedChannelsModel: ObservableObject { - static var shared = SubsribedChannelsModel() +final class SubscribedChannelsModel: ObservableObject { + static var shared = SubscribedChannelsModel() let logger = Logger(label: "stream.yattee.cache.channels") static let diskConfig = DiskConfig(name: "channels") static let memoryConfig = MemoryConfig() let storage = try! Storage( - diskConfig: SubsribedChannelsModel.diskConfig, - memoryConfig: SubsribedChannelsModel.memoryConfig, + diskConfig: SubscribedChannelsModel.diskConfig, + memoryConfig: SubscribedChannelsModel.memoryConfig, transformer: CacheModel.jsonTransformer ) diff --git a/Shared/Navigation/AppSidebarSubscriptions.swift b/Shared/Navigation/AppSidebarSubscriptions.swift index 7b880ca3..7585017a 100644 --- a/Shared/Navigation/AppSidebarSubscriptions.swift +++ b/Shared/Navigation/AppSidebarSubscriptions.swift @@ -3,7 +3,7 @@ import SwiftUI struct AppSidebarSubscriptions: View { @ObservedObject private var navigation = NavigationModel.shared - @ObservedObject private var subscriptions = SubsribedChannelsModel.shared + @ObservedObject private var subscriptions = SubscribedChannelsModel.shared var body: some View { Section(header: Text("Subscriptions")) { diff --git a/Shared/Navigation/AppTabNavigation.swift b/Shared/Navigation/AppTabNavigation.swift index 2213872d..683ba6a1 100644 --- a/Shared/Navigation/AppTabNavigation.swift +++ b/Shared/Navigation/AppTabNavigation.swift @@ -5,7 +5,7 @@ struct AppTabNavigation: View { @ObservedObject private var accounts = AccountsModel.shared @ObservedObject private var navigation = NavigationModel.shared private var player = PlayerModel.shared - @ObservedObject private var subscriptions = SubsribedChannelsModel.shared + @ObservedObject private var subscriptions = SubscribedChannelsModel.shared @Default(.showHome) private var showHome @Default(.showDocuments) private var showDocuments diff --git a/Shared/Navigation/ContentView.swift b/Shared/Navigation/ContentView.swift index c9213ed1..dbd65671 100644 --- a/Shared/Navigation/ContentView.swift +++ b/Shared/Navigation/ContentView.swift @@ -12,7 +12,7 @@ struct ContentView: View { @ObservedObject private var navigation = NavigationModel.shared @ObservedObject private var player = PlayerModel.shared private var playlists = PlaylistsModel.shared - private var subscriptions = SubsribedChannelsModel.shared + private var subscriptions = SubscribedChannelsModel.shared #if os(iOS) @Environment(\.horizontalSizeClass) private var horizontalSizeClass diff --git a/Shared/Player/AppleAVPlayerViewController.swift b/Shared/Player/AppleAVPlayerViewController.swift index 4ef4eeba..9fdc057d 100644 --- a/Shared/Player/AppleAVPlayerViewController.swift +++ b/Shared/Player/AppleAVPlayerViewController.swift @@ -8,7 +8,7 @@ final class AppleAVPlayerViewController: UIViewController { var navigationModel: NavigationModel { .shared } var playerModel: PlayerModel { .shared } var playlistsModel: PlaylistsModel { .shared } - var subscriptionsModel: SubsribedChannelsModel { .shared } + var subscriptionsModel: SubscribedChannelsModel { .shared } var playerView = AVPlayerViewController() let persistenceController = PersistenceController.shared diff --git a/Shared/Player/Video Details/CommentView.swift b/Shared/Player/Video Details/CommentView.swift index 0b708fca..28f2d0b6 100644 --- a/Shared/Player/Video Details/CommentView.swift +++ b/Shared/Player/Video Details/CommentView.swift @@ -15,7 +15,7 @@ struct CommentView: View { @Environment(\.navigationStyle) private var navigationStyle @ObservedObject private var comments = CommentsModel.shared - var subscriptions = SubsribedChannelsModel.shared + var subscriptions = SubscribedChannelsModel.shared var body: some View { VStack(alignment: .leading) { diff --git a/Shared/Player/Video Details/VideoActions.swift b/Shared/Player/Video Details/VideoActions.swift index 22daf34a..caf21493 100644 --- a/Shared/Player/Video Details/VideoActions.swift +++ b/Shared/Player/Video Details/VideoActions.swift @@ -4,7 +4,7 @@ import SwiftUI struct VideoActions: View { @ObservedObject private var accounts = AccountsModel.shared var navigation = NavigationModel.shared - @ObservedObject private var subscriptions = SubsribedChannelsModel.shared + @ObservedObject private var subscriptions = SubscribedChannelsModel.shared @ObservedObject private var player = PlayerModel.shared var video: Video? diff --git a/Shared/Subscriptions/ChannelsView.swift b/Shared/Subscriptions/ChannelsView.swift index a93a2e88..5a76ea34 100644 --- a/Shared/Subscriptions/ChannelsView.swift +++ b/Shared/Subscriptions/ChannelsView.swift @@ -2,7 +2,7 @@ import SDWebImageSwiftUI import SwiftUI struct ChannelsView: View { - @ObservedObject private var subscriptions = SubsribedChannelsModel.shared + @ObservedObject private var subscriptions = SubscribedChannelsModel.shared @ObservedObject private var accounts = AccountsModel.shared var body: some View { diff --git a/Shared/Views/ChannelVideosView.swift b/Shared/Views/ChannelVideosView.swift index 24b22ae8..825365ef 100644 --- a/Shared/Views/ChannelVideosView.swift +++ b/Shared/Views/ChannelVideosView.swift @@ -24,7 +24,7 @@ struct ChannelVideosView: View { @ObservedObject private var accounts = AccountsModel.shared @ObservedObject private var navigation = NavigationModel.shared @ObservedObject private var recents = RecentsModel.shared - @ObservedObject private var subscriptions = SubsribedChannelsModel.shared + @ObservedObject private var subscriptions = SubscribedChannelsModel.shared @Namespace private var focusNamespace var presentedChannel: Channel? { diff --git a/Shared/Views/ControlsBar.swift b/Shared/Views/ControlsBar.swift index 6afb3419..d03a3e2a 100644 --- a/Shared/Views/ControlsBar.swift +++ b/Shared/Views/ControlsBar.swift @@ -14,7 +14,7 @@ struct ControlsBar: View { var navigation = NavigationModel.shared @ObservedObject private var model = PlayerModel.shared @ObservedObject private var playlists = PlaylistsModel.shared - @ObservedObject private var subscriptions = SubsribedChannelsModel.shared + @ObservedObject private var subscriptions = SubscribedChannelsModel.shared @ObservedObject private var controls = PlayerControlsModel.shared diff --git a/Shared/Views/VideoContextMenuView.swift b/Shared/Views/VideoContextMenuView.swift index 0556881f..56fa7598 100644 --- a/Shared/Views/VideoContextMenuView.swift +++ b/Shared/Views/VideoContextMenuView.swift @@ -15,7 +15,7 @@ struct VideoContextMenuView: View { @ObservedObject private var navigation = NavigationModel.shared @ObservedObject private var player = PlayerModel.shared @ObservedObject private var playlists = PlaylistsModel.shared - @ObservedObject private var subscriptions = SubsribedChannelsModel.shared + @ObservedObject private var subscriptions = SubscribedChannelsModel.shared @FetchRequest private var watchRequest: FetchedResults diff --git a/Shared/YatteeApp.swift b/Shared/YatteeApp.swift index ad086d8a..a7d29e9e 100644 --- a/Shared/YatteeApp.swift +++ b/Shared/YatteeApp.swift @@ -40,7 +40,7 @@ struct YatteeApp: App { @StateObject private var playlists = PlaylistsModel.shared @StateObject private var recents = RecentsModel.shared @StateObject private var settings = SettingsModel.shared - @StateObject private var subscriptions = SubsribedChannelsModel.shared + @StateObject private var subscriptions = SubscribedChannelsModel.shared @StateObject private var thumbnails = ThumbnailsModel.shared let persistenceController = PersistenceController.shared diff --git a/Yattee.xcodeproj/project.pbxproj b/Yattee.xcodeproj/project.pbxproj index 332e6457..8bcf8b91 100644 --- a/Yattee.xcodeproj/project.pbxproj +++ b/Yattee.xcodeproj/project.pbxproj @@ -497,7 +497,7 @@ 3774124C27387D2300423605 /* RecentsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37C194C626F6A9C8005D3B96 /* RecentsModel.swift */; }; 3774124D27387D2300423605 /* PlaylistsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BA794226DBA973002A0235 /* PlaylistsModel.swift */; }; 3774124E27387D2300423605 /* Playlist.swift in Sources */ = {isa = PBXBuildFile; fileRef = 376578882685471400D4EA09 /* Playlist.swift */; }; - 3774124F27387D2300423605 /* SubsribedChannelsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E64DD026D597EB00C71877 /* SubsribedChannelsModel.swift */; }; + 3774124F27387D2300423605 /* SubscribedChannelsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E64DD026D597EB00C71877 /* SubscribedChannelsModel.swift */; }; 3774125027387D2300423605 /* Video.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B19626717E1500C925CA /* Video.swift */; }; 3774125127387D2300423605 /* NavigationModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 371F2F19269B43D300E4A7AB /* NavigationModel.swift */; }; 3774125227387D2300423605 /* Thumbnail.swift in Sources */ = {isa = PBXBuildFile; fileRef = 373CFADA269663F1003CB2C6 /* Thumbnail.swift */; }; @@ -833,9 +833,9 @@ 37E04C0F275940FB00172673 /* VerticalScrollingFix.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E04C0E275940FB00172673 /* VerticalScrollingFix.swift */; }; 37E084AC2753D95F00039B7D /* AccountsNavigationLink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E084AB2753D95F00039B7D /* AccountsNavigationLink.swift */; }; 37E084AD2753D95F00039B7D /* AccountsNavigationLink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E084AB2753D95F00039B7D /* AccountsNavigationLink.swift */; }; - 37E64DD126D597EB00C71877 /* SubsribedChannelsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E64DD026D597EB00C71877 /* SubsribedChannelsModel.swift */; }; - 37E64DD226D597EB00C71877 /* SubsribedChannelsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E64DD026D597EB00C71877 /* SubsribedChannelsModel.swift */; }; - 37E64DD326D597EB00C71877 /* SubsribedChannelsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E64DD026D597EB00C71877 /* SubsribedChannelsModel.swift */; }; + 37E64DD126D597EB00C71877 /* SubscribedChannelsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E64DD026D597EB00C71877 /* SubscribedChannelsModel.swift */; }; + 37E64DD226D597EB00C71877 /* SubscribedChannelsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E64DD026D597EB00C71877 /* SubscribedChannelsModel.swift */; }; + 37E64DD326D597EB00C71877 /* SubscribedChannelsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E64DD026D597EB00C71877 /* SubscribedChannelsModel.swift */; }; 37E6D79C2944AE1A00550C3D /* FeedModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E6D79B2944AE1A00550C3D /* FeedModel.swift */; }; 37E6D79D2944AE1A00550C3D /* FeedModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E6D79B2944AE1A00550C3D /* FeedModel.swift */; }; 37E6D79E2944AE1A00550C3D /* FeedModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E6D79B2944AE1A00550C3D /* FeedModel.swift */; }; @@ -1377,7 +1377,7 @@ 37DD9DC22785D63A00539416 /* UIResponder+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIResponder+Extensions.swift"; sourceTree = ""; }; 37E04C0E275940FB00172673 /* VerticalScrollingFix.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VerticalScrollingFix.swift; sourceTree = ""; }; 37E084AB2753D95F00039B7D /* AccountsNavigationLink.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountsNavigationLink.swift; sourceTree = ""; }; - 37E64DD026D597EB00C71877 /* SubsribedChannelsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubsribedChannelsModel.swift; sourceTree = ""; }; + 37E64DD026D597EB00C71877 /* SubscribedChannelsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscribedChannelsModel.swift; sourceTree = ""; }; 37E6D79B2944AE1A00550C3D /* FeedModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedModel.swift; sourceTree = ""; }; 37E6D79F2944CD3800550C3D /* CacheStatusHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CacheStatusHeader.swift; sourceTree = ""; }; 37E70922271CD43000D34DDE /* WelcomeScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeScreen.swift; sourceTree = ""; }; @@ -2261,6 +2261,7 @@ 37494EA629200E0B000DF176 /* DocumentsModel.swift */, 37599F2F272B42810087F250 /* FavoriteItem.swift */, 37599F33272B44000087F250 /* FavoritesModel.swift */, + 37E6D79B2944AE1A00550C3D /* FeedModel.swift */, 37BC50AB2778BCBA00510953 /* HistoryModel.swift */, 377ABC3F286E4AD5009C986F /* InstancesManifest.swift */, 375B8AB228B580D300397B31 /* KeychainModel.swift */, @@ -2282,7 +2283,7 @@ 37CEE4BC2677B670005A1EFE /* SingleAssetStream.swift */, 3797758A2689345500DD52A8 /* Store.swift */, 37CEE4C02677B697005A1EFE /* Stream.swift */, - 37E64DD026D597EB00C71877 /* SubsribedChannelsModel.swift */, + 37E64DD026D597EB00C71877 /* SubscribedChannelsModel.swift */, 373CFADA269663F1003CB2C6 /* Thumbnail.swift */, 37C0698127260B2100F7F6CB /* ThumbnailsModel.swift */, 3705B181267B4E4900704544 /* TrendingCategory.swift */, @@ -2336,7 +2337,6 @@ isa = PBXGroup; children = ( 378E9C3F29455A5800B2D696 /* ChannelsView.swift */, - 37E6D79B2944AE1A00550C3D /* FeedModel.swift */, 37AAF29F26741C97007FC770 /* FeedView.swift */, 3728203F2945E4A8009A0E2D /* SubscriptionsPageButton.swift */, 378E9C3B2945565500B2D696 /* SubscriptionsView.swift */, @@ -3031,7 +3031,7 @@ 375E45F827B1AC4700BA7902 /* PlayerControlsModel.swift in Sources */, 37EAD86F267B9ED100D9E01B /* Segment.swift in Sources */, 375168D62700FAFF008F96A6 /* Debounce.swift in Sources */, - 37E64DD126D597EB00C71877 /* SubsribedChannelsModel.swift in Sources */, + 37E64DD126D597EB00C71877 /* SubscribedChannelsModel.swift in Sources */, 37C89322294532220032AFD3 /* PlayerOverlayModifier.swift in Sources */, 376578892685471400D4EA09 /* Playlist.swift in Sources */, 37B4E803277D0A72004BF56A /* AppDelegate.swift in Sources */, @@ -3338,7 +3338,7 @@ 3784B23E2728B85300B09468 /* ShareButton.swift in Sources */, 375F7411289DC35A00747050 /* PlayerBackendView.swift in Sources */, 37FEF11427EFD8580033912F /* PlaceholderCell.swift in Sources */, - 37E64DD226D597EB00C71877 /* SubsribedChannelsModel.swift in Sources */, + 37E64DD226D597EB00C71877 /* SubscribedChannelsModel.swift in Sources */, 37F0F4EF286F734400C06C2E /* AdvancedSettings.swift in Sources */, 37C7A1D6267BFD9D0010EAD6 /* SponsorBlockSegment.swift in Sources */, 37319F0627103F94004ECCD0 /* PlayerQueue.swift in Sources */, @@ -3468,7 +3468,7 @@ 3774123327387CB000423605 /* Defaults.swift in Sources */, 3774124E27387D2300423605 /* Playlist.swift in Sources */, 3766AFD2273DA97D00686348 /* Int+FormatTests.swift in Sources */, - 3774124F27387D2300423605 /* SubsribedChannelsModel.swift in Sources */, + 3774124F27387D2300423605 /* SubscribedChannelsModel.swift in Sources */, 3774126127387D2D00423605 /* AccountsModel.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -3563,7 +3563,7 @@ 373CFADD269663F1003CB2C6 /* Thumbnail.swift in Sources */, 376B0562293FF45F0062AC78 /* PeerTubeAPI.swift in Sources */, 3738535629451DC800D2D0CB /* BookmarksCacheModel.swift in Sources */, - 37E64DD326D597EB00C71877 /* SubsribedChannelsModel.swift in Sources */, + 37E64DD326D597EB00C71877 /* SubscribedChannelsModel.swift in Sources */, 3752069B285E8DD300CA655F /* Chapter.swift in Sources */, 37B044B926F7AB9000E1419D /* SettingsView.swift in Sources */, 3743B86A27216D3600261544 /* ChannelCell.swift in Sources */,