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
| # Running CPD | |
| pmd cpd --files ${EXECUTABLE_NAME} --minimum-tokens 50 --language swift --encoding UTF-8 --format net.sourceforge.pmd.cpd.XMLRenderer > cpd-output.xml --failOnViolation true | |
| # Running script | |
| php ./common_strings/cpd_script.php -cpd-xml cpd-output.xml |
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
| class SpringyFlowLayout: ChatCollectionViewLayout { | |
| var dynamicAnimator: UIDynamicAnimator? | |
| override func prepareLayout() { | |
| super.prepareLayout() | |
| if dynamicAnimator != nil { | |
| return | |
| } |
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
| let frame = CGRect(x: 0, y: 0, width: 1, height: 1) | |
| var options = [UNNotificationAttachmentOptionsThumbnailClippingRectKey: frame] |
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
| enum ImageUploadType: String { | |
| case UserBlogPhoto = "userBlogPhoto" // 240x135 pixels | |
| case CarJournalPhoto = "carJournalPhoto" // 240x135 pixels | |
| case MessengerImage = "messengerImage" // 240x135 pixels | |
| case CarPhoto = "carPhoto" // 480x270 pixels | |
| } | |
| class ImageUploadRequest { | |
| class func post(imageFile: UIImage, type: ImageUploadType, success: ((ApiResponse) -> Void)?, |
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
| final class ChatSettingsViewModel { | |
| var titleSection: Int = 0 | |
| var creatorSection: Int? | |
| var memberSection: Int? | |
| var observerSection: Int? | |
| var numberOfSections: Int? | |
| init(type: SettingsType) { |
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
| override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { | |
| let shortPath = (indexPath.section, indexPath.row) | |
| switch shortPath { | |
| case (settingsModel.titleSection, _): | |
| return chatTitleCell(indexPath) | |
| case (settingsModel.creatorSection!, _): | |
| return memberCell(indexPath, type: .Creator) | |
| case (settingsModel.memberSection!, 0): |