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
// Main subscription method | |
private func subscribeToRooms(withChats chats: Chats, completion: @escaping (_ conversations: ChatsWithSubscriber) -> Void) { | |
guard let user = chatUser else {return} | |
let activeCurrentUserChats = chats.filter { (aChat) -> Bool in | |
return user.rooms.contains(where: { (pcRoom) -> Bool in | |
if aChat is ProjectChat && pcRoom.lastMessageAt == nil { | |
return false | |
} | |
return aChat.room.roomID == pcRoom.id |
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
// | |
// MovieRecorder.swift | |
// RosyWriter | |
// | |
// Translated by OOPer in cooperation with shlab.jp, on 2015/1/17. | |
// | |
// | |
// | |
/* | |
Copyright (C) 2016 Apple Inc. All Rights Reserved. |
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
// | |
// Capture.swift | |
// DemoVIdeoRecordingAndFirebase | |
// | |
// Created by Redditor :D on 02/04/2017. | |
// | |
import UIKit | |
import AVKit | |
import AVFoundation |
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
import UIKit | |
import AVKit | |
import AVFoundation | |
import AssetsLibrary | |
func synchronized(_ object: AnyObject, block: () -> Void) { | |
objc_sync_enter(object) | |
block() | |
objc_sync_exit(object) | |
} |