mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-05-01 13:24:18 +08:00
33 lines
662 B
Swift
33 lines
662 B
Swift
//
|
|
// IssueDiffHunkModel.swift
|
|
// Freetime
|
|
//
|
|
// Created by Ryan Nystrom on 7/3/17.
|
|
// Copyright © 2017 Ryan Nystrom. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import IGListKit
|
|
|
|
final class IssueDiffHunkModel: ListDiffable {
|
|
|
|
let path: String
|
|
let preview: NSAttributedStringSizing
|
|
|
|
init(path: String, preview: NSAttributedStringSizing) {
|
|
self.path = path
|
|
self.preview = preview
|
|
}
|
|
|
|
// MARK: ListDiffable
|
|
|
|
func diffIdentifier() -> NSObjectProtocol {
|
|
return preview.attributedText.string as NSObjectProtocol
|
|
}
|
|
|
|
func isEqual(toDiffableObject object: ListDiffable?) -> Bool {
|
|
return true
|
|
}
|
|
|
|
}
|