mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-06-12 08:48:19 +08:00
* 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
33 lines
720 B
Swift
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
|
|
}
|
|
|
|
}
|