Files
GitHawk/Classes/PullRequestReviews/PullRequestReviewReplyModel.swift
Ryan Nystrom ec4807d415 Reply to Pull Request Review comments (#1483)
* wip

* reply cell shows up in comments

* focus on reply model and scroll to reply

* api to create PR comment replies

* reply working

* clean and code reuse

* even more reuse

* organize
2018-02-04 19:08:34 -05:00

33 lines
720 B
Swift

//
// PullRequestReviewReplyModel.swift
// Freetime
//
// Created by Ryan Nystrom on 1/29/18.
// Copyright © 2018 Ryan Nystrom. All rights reserved.
//
import Foundation
import IGListKit
final class PullRequestReviewReplyModel: ListDiffable {
let replyID: Int
init(replyID: Int) {
self.replyID = replyID
}
// MARK: ListDiffable
func diffIdentifier() -> NSObjectProtocol {
return "reply-\(replyID)" as NSObjectProtocol
}
func isEqual(toDiffableObject object: ListDiffable?) -> Bool {
if self === object { return true }
guard let object = object as? PullRequestReviewReplyModel else { return false }
return replyID == object.replyID
}
}