-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: resolve warnings and update swiftlint.yml
- Loading branch information
1 parent
f316b1c
commit d489e1c
Showing
31 changed files
with
270 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Authorization/Authorization.xcodeproj/xcshareddata/xcschemes/Authorization.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
// | ||
// Constants.swift | ||
// AuthConstants.swift | ||
// Core | ||
// | ||
// Created by Vladimir Chekyrta on 14.09.2022. | ||
// | ||
|
||
import Foundation | ||
|
||
// TODO move it to config file and parse | ||
public struct Constants { | ||
public struct AuthConstants { | ||
public static let GrantTypePassword = "password" | ||
public static let GrantTypeRefreshToken = "refresh_token" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
// | ||
// DownloadManagerMock.swift | ||
// Core | ||
// | ||
// Created by Ivan Stepanok on 11.12.2024. | ||
// | ||
|
||
import Foundation | ||
import Combine | ||
|
||
// Mark - For testing and SwiftUI preview | ||
#if DEBUG | ||
public class DownloadManagerMock: DownloadManagerProtocol { | ||
|
||
public init() {} | ||
|
||
public func updateUnzippedFileSize(for sequentials: [CourseSequential]) -> [CourseSequential] {[]} | ||
|
||
public var currentDownloadTask: DownloadDataTask? { | ||
return nil | ||
} | ||
|
||
public func publisher() -> AnyPublisher<Int, Never> { | ||
return Just(1).eraseToAnyPublisher() | ||
} | ||
|
||
public func eventPublisher() -> AnyPublisher<DownloadManagerEvent, Never> { | ||
return Just( | ||
.canceled( | ||
.init( | ||
id: "", | ||
blockId: "", | ||
courseId: "", | ||
userId: 0, | ||
url: "", | ||
fileName: "", | ||
displayName: "", | ||
progress: 1, | ||
resumeData: nil, | ||
state: .inProgress, | ||
type: .video, | ||
fileSize: 0, | ||
lastModified: "" | ||
) | ||
) | ||
).eraseToAnyPublisher() | ||
} | ||
|
||
public func addToDownloadQueue(blocks: [CourseBlock]) {} | ||
|
||
public func getDownloadTasks() -> [DownloadDataTask] { | ||
[] | ||
} | ||
|
||
public func getDownloadTasksForCourse(_ courseId: String) async -> [DownloadDataTask] { | ||
await withCheckedContinuation { continuation in | ||
continuation.resume(returning: []) | ||
} | ||
} | ||
|
||
public func cancelDownloading(courseId: String, blocks: [CourseBlock]) async throws {} | ||
|
||
public func cancelDownloading(task: DownloadDataTask) {} | ||
|
||
public func cancelDownloading(courseId: String) async {} | ||
|
||
public func cancelAllDownloading() async throws {} | ||
|
||
public func resumeDownloading() {} | ||
|
||
public func deleteFile(blocks: [CourseBlock]) {} | ||
|
||
public func deleteAllFiles() {} | ||
|
||
public func fileUrl(for blockId: String) -> URL? { | ||
return nil | ||
} | ||
|
||
public func isLargeVideosSize(blocks: [CourseBlock]) -> Bool { | ||
false | ||
} | ||
|
||
public func removeAppSupportDirectoryUnusedContent() {} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.