Files
GitHawk/Classes/Issues/Review/IssueReviewModel.swift
Ryan Nystrom 4733859946 Open PR comments in another VC (#828)
* WIP PR comments

* thread comment count to PR review model

* PR review comments in another VC
2017-11-04 21:46:21 -04:00

38 lines
876 B
Swift

//
// IssueReviewModel.swift
// Freetime
//
// Created by Ryan Nystrom on 7/5/17.
// Copyright © 2017 Ryan Nystrom. All rights reserved.
//
import Foundation
import IGListKit
final class IssueReviewModel: ListDiffable {
let id: String
let details: IssueReviewDetailsModel
let bodyModels: [ListDiffable]
let commentCount: Int
init(id: String, details: IssueReviewDetailsModel, bodyModels: [ListDiffable], commentCount: Int) {
self.id = id
self.details = details
self.bodyModels = bodyModels
self.commentCount = commentCount
}
// MARK: ListDiffable
func diffIdentifier() -> NSObjectProtocol {
return id as NSObjectProtocol
}
func isEqual(toDiffableObject object: ListDiffable?) -> Bool {
// uses binding SC, so must be true if the identifiers match
return true
}
}