This file contains hidden or 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
# list all folders | |
layerList=$(find -name 'flayer') | |
curDir=$(pwd) | |
echo executing $layerList | |
echo curdir is $curDir | |
# loop though each path | |
for path in $layerList | |
do | |
echo $path |
This file contains hidden or 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
import Foundation | |
import AVKit | |
import SwiftUI | |
import AVFoundation | |
import Combine | |
class AudioPlayViewModel: ObservableObject { | |
private var timer: Timer? |
This file contains hidden or 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
import Foundation | |
import SwiftUI | |
struct AudioPreviewModel: Hashable { | |
var magnitude: Float | |
var color: Color | |
} |
This file contains hidden or 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
import Foundation | |
import Combine | |
import Alamofire | |
import AVFoundation | |
protocol ServiceProtocol { | |
func buffer(url: URL, samplesCount: Int, completion: @escaping([AudioPreviewModel]) -> ()) | |
} |
This file contains hidden or 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
// | |
// ContentView.swift | |
// CustomCameraApp | |
// | |
// Created by Karen Mirakyan on 09.05.22. | |
// | |
import SwiftUI | |
import CameraXPN |
This file contains hidden or 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
import Foundation | |
import SwiftUI | |
class AlertViewModel { | |
@AppStorage("token") private var token: String = "" | |
func makeAlert(with error: NetworkError, message: inout String, alert: inout Bool ) { | |
if error.initialError.responseCode == 401 { |
This file contains hidden or 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
import Foundation | |
import Combine | |
class ViewModel: ObservableObject { | |
@Published var chats = [ChatModel]() | |
@Published var chatListLoadingError: String = "" | |
@Published var showAlert: Bool = false | |
private var cancellableSet: Set<AnyCancellable> = [] | |
var dataManager: ServiceProtocol |
This file contains hidden or 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
import Foundation | |
import Combine | |
import Alamofire | |
protocol ServiceProtocol { | |
func fetchChats() -> AnyPublisher<DataResponse<ChatListModel, NetworkError>, Never> | |
} | |
class Service { |
This file contains hidden or 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
import Foundation | |
struct ChatListModel: Codable { | |
var chats: [ChatModel] | |
} | |
struct ChatModel: Identifiable, Codable { | |
var id: Int | |
var chatName: String | |
var image: String | |
var message: ChatPreveiwMessage? |
NewerOlder