medmap-ios/medmap/ViewModels/SplashScreenViewModel.swift
2026-08-27 23:26:14 +01:00

70 lines
1.6 KiB
Swift
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// SplashScreenViewModel.swift
// FluxRead
//
// Created by RSA on 29/11/2025.
//
import Foundation
import Combine
import UIKit
class SplashScreenViewModel: ViewModel {
override init() {
super.init()
}
/*
private func showNextImageIfNeeded() {
guard !isShowingImages, !imageQueue.isEmpty else { return }
isShowingImages = true
let image = imageQueue.removeFirst()
DispatchQueue.main.async {
self.currentImage = image
self.currentLoadingProgress = Double(self.loadedComics) / Double(self.numberOfComics)
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
self.isShowingImages = false
self.showNextImageIfNeeded()
}
}
}
*/
/*
/// Lists all files in the cache directory whose names start with "fc"
func listFCFiles() -> [URL] {
let cacheDir = fileSystemManager.cacheDirectory
let fileManager = FileManager.default
guard let contents = try? fileManager.contentsOfDirectory(
at: cacheDir,
includingPropertiesForKeys: [.isRegularFileKey],
options: [.skipsHiddenFiles]
) else {
print("⚠️ Could not read cache directory: \(cacheDir.path)")
return []
}
let fcFiles = contents.filter { url in
url.lastPathComponent.lowercased().hasPrefix("fx")
}
print("📂 Found \(fcFiles.count) file(s) starting with 'fc' in cache:")
fcFiles.forEach { print(" • \($0.lastPathComponent)") }
return fcFiles
}
*/
}