mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-05-27 17:00:12 +08:00
combine all events into single type, fixes #129
This commit is contained in:
@@ -85,6 +85,7 @@ extension IssueOrPullRequestQuery.Data.Repository.IssueOrPullRequest.AsIssue: Is
|
||||
let model = IssueStatusEventModel(
|
||||
id: closed.fragments.nodeFields.id,
|
||||
actor: closed.actor?.login ?? Strings.unknown,
|
||||
commitHash: closed.closedCommit?.oid,
|
||||
date: date,
|
||||
status: .closed,
|
||||
pullRequest: false
|
||||
@@ -95,6 +96,7 @@ extension IssueOrPullRequestQuery.Data.Repository.IssueOrPullRequest.AsIssue: Is
|
||||
let model = IssueStatusEventModel(
|
||||
id: reopened.fragments.nodeFields.id,
|
||||
actor: reopened.actor?.login ?? Strings.unknown,
|
||||
commitHash: nil,
|
||||
date: date,
|
||||
status: .reopened,
|
||||
pullRequest: false
|
||||
@@ -105,6 +107,7 @@ extension IssueOrPullRequestQuery.Data.Repository.IssueOrPullRequest.AsIssue: Is
|
||||
let model = IssueStatusEventModel(
|
||||
id: locked.fragments.nodeFields.id,
|
||||
actor: locked.actor?.login ?? Strings.unknown,
|
||||
commitHash: nil,
|
||||
date: date,
|
||||
status: .locked,
|
||||
pullRequest: false
|
||||
@@ -115,6 +118,7 @@ extension IssueOrPullRequestQuery.Data.Repository.IssueOrPullRequest.AsIssue: Is
|
||||
let model = IssueStatusEventModel(
|
||||
id: unlocked.fragments.nodeFields.id,
|
||||
actor: unlocked.actor?.login ?? Strings.unknown,
|
||||
commitHash: nil,
|
||||
date: date,
|
||||
status: .unlocked,
|
||||
pullRequest: false
|
||||
|
||||
@@ -99,8 +99,7 @@ final class IssuesViewController: UIViewController, ListAdapterDataSource, FeedD
|
||||
case is IssueLabelsModel: return IssueLabelsSectionController()
|
||||
case is IssueStatusModel: return IssueStatusSectionController()
|
||||
case is IssueLabeledModel: return IssueLabeledSectionController(owner: owner, repo: repo)
|
||||
case is IssueStatusEventModel: return IssueStatusEventSectionController()
|
||||
case is IssueMergedModel: return IssueMergedSectionController(owner: owner, repo: repo)
|
||||
case is IssueStatusEventModel: return IssueStatusEventSectionController(owner: owner, repo: repo)
|
||||
case is IssueDiffHunkModel: return IssueDiffHunkSectionController()
|
||||
case is IssueReviewModel: return IssueReviewSectionController()
|
||||
case is IssueReferencedModel: return IssueReferencedSectionController(client: client)
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
//
|
||||
// IssueMergedCell.swift
|
||||
// Freetime
|
||||
//
|
||||
// Created by Ryan Nystrom on 6/29/17.
|
||||
// Copyright © 2017 Ryan Nystrom. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import SnapKit
|
||||
|
||||
protocol IssueMergedCellDelegate: class {
|
||||
func didTapActor(cell: IssueMergedCell)
|
||||
func didTapHash(cell: IssueMergedCell)
|
||||
}
|
||||
|
||||
final class IssueMergedCell: UICollectionViewCell {
|
||||
|
||||
weak var delegate: IssueMergedCellDelegate? = nil
|
||||
|
||||
private let actorButton = UIButton()
|
||||
private let hashButton = UIButton()
|
||||
private let mergedButton = UIButton()
|
||||
private let dateLabel = ShowMoreDetailsLabel()
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
|
||||
actorButton.titleLabel?.font = Styles.Fonts.bodyBold
|
||||
actorButton.setTitleColor(Styles.Colors.Gray.dark.color, for: .normal)
|
||||
actorButton.addTarget(self, action: #selector(IssueMergedCell.onActor), for: .touchUpInside)
|
||||
contentView.addSubview(actorButton)
|
||||
actorButton.snp.makeConstraints { make in
|
||||
make.left.equalTo(Styles.Sizes.gutter)
|
||||
make.centerY.equalTo(contentView)
|
||||
}
|
||||
|
||||
mergedButton.setTitle(Strings.merged, for: .normal)
|
||||
mergedButton.setupAsLabel()
|
||||
mergedButton.config(pullRequest: false, state: .merged)
|
||||
contentView.addSubview(mergedButton)
|
||||
mergedButton.snp.makeConstraints { make in
|
||||
make.left.equalTo(actorButton.snp.right).offset(Styles.Sizes.inlineSpacing)
|
||||
make.centerY.equalTo(contentView)
|
||||
}
|
||||
|
||||
hashButton.titleLabel?.font = UIFont(name: "Courier-Bold", size: Styles.Sizes.Text.body)
|
||||
hashButton.setTitleColor(Styles.Colors.Gray.dark.color, for: .normal)
|
||||
hashButton.addTarget(self, action: #selector(IssueMergedCell.onHash), for: .touchUpInside)
|
||||
contentView.addSubview(hashButton)
|
||||
hashButton.snp.makeConstraints { make in
|
||||
make.left.equalTo(mergedButton.snp.right).offset(Styles.Sizes.inlineSpacing)
|
||||
make.centerY.equalTo(contentView)
|
||||
}
|
||||
|
||||
dateLabel.font = Styles.Fonts.body
|
||||
dateLabel.textColor = Styles.Colors.Gray.medium.color
|
||||
dateLabel.backgroundColor = .clear
|
||||
contentView.addSubview(dateLabel)
|
||||
dateLabel.snp.makeConstraints { make in
|
||||
make.left.equalTo(hashButton.snp.right).offset(Styles.Sizes.inlineSpacing)
|
||||
make.centerY.equalTo(contentView)
|
||||
}
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
// MARK: Private API
|
||||
|
||||
func onActor() {
|
||||
delegate?.didTapActor(cell: self)
|
||||
}
|
||||
|
||||
func onHash() {
|
||||
delegate?.didTapHash(cell: self)
|
||||
}
|
||||
|
||||
// MARK: Public API
|
||||
|
||||
func configure(viewModel: IssueMergedModel) {
|
||||
actorButton.setTitle(viewModel.actor, for: .normal)
|
||||
dateLabel.setText(date: viewModel.date)
|
||||
hashButton.setTitle(viewModel.commitHash.hashDisplay, for: .normal)
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
//
|
||||
// IssueMergedModel.swift
|
||||
// Freetime
|
||||
//
|
||||
// Created by Ryan Nystrom on 6/29/17.
|
||||
// Copyright © 2017 Ryan Nystrom. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import IGListKit
|
||||
|
||||
final class IssueMergedModel: ListDiffable {
|
||||
|
||||
let date: Date
|
||||
let commitHash: String
|
||||
let actor: String
|
||||
|
||||
init(date: Date, commitHash: String, actor: String) {
|
||||
self.date = date
|
||||
self.commitHash = commitHash
|
||||
self.actor = actor
|
||||
}
|
||||
|
||||
// MARK: ListDiffable
|
||||
|
||||
func diffIdentifier() -> NSObjectProtocol {
|
||||
return commitHash as NSObjectProtocol
|
||||
}
|
||||
|
||||
func isEqual(toDiffableObject object: ListDiffable?) -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
//
|
||||
// IssueMergedSectionController.swift
|
||||
// Freetime
|
||||
//
|
||||
// Created by Ryan Nystrom on 6/29/17.
|
||||
// Copyright © 2017 Ryan Nystrom. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import IGListKit
|
||||
|
||||
final class IssueMergedSectionController: ListGenericSectionController<IssueMergedModel>, IssueMergedCellDelegate {
|
||||
|
||||
private let owner: String
|
||||
private let repo: String
|
||||
|
||||
init(owner: String, repo: String) {
|
||||
self.owner = owner
|
||||
self.repo = repo
|
||||
super.init()
|
||||
inset = Styles.Sizes.listInsetTight
|
||||
}
|
||||
|
||||
override func sizeForItem(at index: Int) -> CGSize {
|
||||
guard let width = collectionContext?.containerSize.width else { fatalError("Collection context must be set") }
|
||||
return CGSize(width: width, height: Styles.Sizes.labelEventHeight)
|
||||
}
|
||||
|
||||
override func cellForItem(at index: Int) -> UICollectionViewCell {
|
||||
guard let cell = collectionContext?.dequeueReusableCell(of: IssueMergedCell.self, for: self, at: index) as? IssueMergedCell,
|
||||
let object = self.object
|
||||
else { fatalError("Missing context, object, or cell wrong type") }
|
||||
cell.configure(viewModel: object)
|
||||
cell.delegate = self
|
||||
return cell
|
||||
}
|
||||
|
||||
// MARK: IssueMergedCellDelegate
|
||||
|
||||
func didTapActor(cell: IssueMergedCell) {
|
||||
guard let actor = object?.actor else { return }
|
||||
viewController?.presentProfile(login: actor)
|
||||
}
|
||||
|
||||
func didTapHash(cell: IssueMergedCell) {
|
||||
guard let hash = object?.commitHash else { return }
|
||||
viewController?.presentCommit(owner: owner, repo: repo, hash: hash)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -82,6 +82,7 @@ extension IssueOrPullRequestQuery.Data.Repository.IssueOrPullRequest.AsPullReque
|
||||
let model = IssueStatusEventModel(
|
||||
id: closed.fragments.nodeFields.id,
|
||||
actor: closed.actor?.login ?? Strings.unknown,
|
||||
commitHash: closed.closedCommit?.oid,
|
||||
date: date,
|
||||
status: .closed,
|
||||
pullRequest: true
|
||||
@@ -92,6 +93,7 @@ extension IssueOrPullRequestQuery.Data.Repository.IssueOrPullRequest.AsPullReque
|
||||
let model = IssueStatusEventModel(
|
||||
id: reopened.fragments.nodeFields.id,
|
||||
actor: reopened.actor?.login ?? Strings.unknown,
|
||||
commitHash: nil,
|
||||
date: date,
|
||||
status: .reopened,
|
||||
pullRequest: true
|
||||
@@ -99,10 +101,13 @@ extension IssueOrPullRequestQuery.Data.Repository.IssueOrPullRequest.AsPullReque
|
||||
results.append(model)
|
||||
} else if let merged = node.asMergedEvent,
|
||||
let date = GithubAPIDateFormatter().date(from: merged.createdAt) {
|
||||
let model = IssueMergedModel(
|
||||
let model = IssueStatusEventModel(
|
||||
id: merged.fragments.nodeFields.id,
|
||||
actor: merged.actor?.login ?? Strings.unknown,
|
||||
commitHash: merged.mergedCommit.oid,
|
||||
date: date,
|
||||
commitHash: merged.commit.oid,
|
||||
actor: merged.actor?.login ?? Strings.unknown
|
||||
status: .merged,
|
||||
pullRequest: true
|
||||
)
|
||||
results.append(model)
|
||||
} else if let locked = node.asLockedEvent,
|
||||
@@ -110,6 +115,7 @@ extension IssueOrPullRequestQuery.Data.Repository.IssueOrPullRequest.AsPullReque
|
||||
let model = IssueStatusEventModel(
|
||||
id: locked.fragments.nodeFields.id,
|
||||
actor: locked.actor?.login ?? Strings.unknown,
|
||||
commitHash: nil,
|
||||
date: date,
|
||||
status: .locked,
|
||||
pullRequest: false
|
||||
@@ -120,6 +126,7 @@ extension IssueOrPullRequestQuery.Data.Repository.IssueOrPullRequest.AsPullReque
|
||||
let model = IssueStatusEventModel(
|
||||
id: unlocked.fragments.nodeFields.id,
|
||||
actor: unlocked.actor?.login ?? Strings.unknown,
|
||||
commitHash: nil,
|
||||
date: date,
|
||||
status: .unlocked,
|
||||
pullRequest: false
|
||||
|
||||
@@ -11,6 +11,7 @@ import SnapKit
|
||||
|
||||
protocol IssueStatusEventCellDelegate: class {
|
||||
func didTapActor(cell: IssueStatusEventCell)
|
||||
func didTapHash(cell: IssueStatusEventCell)
|
||||
}
|
||||
|
||||
final class IssueStatusEventCell: UICollectionViewCell {
|
||||
@@ -18,9 +19,12 @@ final class IssueStatusEventCell: UICollectionViewCell {
|
||||
weak var delegate: IssueStatusEventCellDelegate? = nil
|
||||
|
||||
private let actorButton = UIButton()
|
||||
private let button = UIButton()
|
||||
private let hashButton = UIButton()
|
||||
private let statusButton = UIButton()
|
||||
private let dateLabel = ShowMoreDetailsLabel()
|
||||
|
||||
private var dateConstraint: Constraint? = nil
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
|
||||
@@ -31,19 +35,28 @@ final class IssueStatusEventCell: UICollectionViewCell {
|
||||
make.centerY.equalTo(contentView)
|
||||
}
|
||||
|
||||
button.setupAsLabel()
|
||||
contentView.addSubview(button)
|
||||
button.snp.makeConstraints { make in
|
||||
statusButton.setupAsLabel()
|
||||
contentView.addSubview(statusButton)
|
||||
statusButton.snp.makeConstraints { make in
|
||||
make.left.equalTo(actorButton.snp.right).offset(Styles.Sizes.inlineSpacing)
|
||||
make.centerY.equalTo(contentView)
|
||||
}
|
||||
|
||||
hashButton.titleLabel?.font = UIFont(name: "Courier-Bold", size: Styles.Sizes.Text.body)
|
||||
hashButton.setTitleColor(Styles.Colors.Gray.dark.color, for: .normal)
|
||||
hashButton.addTarget(self, action: #selector(IssueStatusEventCell.onHash), for: .touchUpInside)
|
||||
contentView.addSubview(hashButton)
|
||||
hashButton.snp.makeConstraints { make in
|
||||
make.left.equalTo(statusButton.snp.right).offset(Styles.Sizes.inlineSpacing)
|
||||
make.centerY.equalTo(contentView)
|
||||
}
|
||||
|
||||
dateLabel.font = Styles.Fonts.body
|
||||
dateLabel.textColor = Styles.Colors.Gray.medium.color
|
||||
dateLabel.backgroundColor = .clear
|
||||
contentView.addSubview(dateLabel)
|
||||
dateLabel.snp.makeConstraints { make in
|
||||
make.left.equalTo(button.snp.right).offset(Styles.Sizes.inlineSpacing)
|
||||
self.dateConstraint = make.left.equalTo(hashButton.snp.right).offset(Styles.Sizes.inlineSpacing).constraint
|
||||
make.centerY.equalTo(contentView)
|
||||
}
|
||||
}
|
||||
@@ -58,6 +71,10 @@ final class IssueStatusEventCell: UICollectionViewCell {
|
||||
delegate?.didTapActor(cell: self)
|
||||
}
|
||||
|
||||
func onHash() {
|
||||
delegate?.didTapHash(cell: self)
|
||||
}
|
||||
|
||||
// MARK: Public API
|
||||
|
||||
func configure(_ model: IssueStatusEventModel) {
|
||||
@@ -67,18 +84,21 @@ final class IssueStatusEventCell: UICollectionViewCell {
|
||||
]
|
||||
actorButton.setAttributedTitle(NSAttributedString(string: model.actor, attributes: actorAttributes), for: .normal)
|
||||
|
||||
button.config(pullRequest: model.pullRequest, state: model.status.buttonState)
|
||||
|
||||
let title: String
|
||||
switch model.status {
|
||||
case .reopened: title = Strings.reopened // open event only happens when RE-opening
|
||||
case .closed: title = Strings.closed
|
||||
case .locked: title = Strings.locked
|
||||
case .unlocked: title = NSLocalizedString("Unlocked", comment: "")
|
||||
case .merged: fatalError("Merge events handled in other model+cell")
|
||||
case .merged: title = Strings.merged
|
||||
}
|
||||
button.setTitle(title, for: .normal)
|
||||
statusButton.setTitle(title, for: .normal)
|
||||
statusButton.config(pullRequest: model.pullRequest, state: model.status.buttonState)
|
||||
|
||||
let hash = model.commitHash?.hashDisplay
|
||||
hashButton.setTitle(hash, for: .normal)
|
||||
|
||||
dateConstraint?.update(offset: hash == nil ? -30 : Styles.Sizes.inlineSpacing)
|
||||
dateLabel.setText(date: model.date)
|
||||
}
|
||||
|
||||
|
||||
@@ -13,13 +13,15 @@ final class IssueStatusEventModel: ListDiffable {
|
||||
|
||||
let id: String
|
||||
let actor: String
|
||||
let commitHash: String?
|
||||
let date: Date
|
||||
let status: IssueStatusEvent
|
||||
let pullRequest: Bool
|
||||
|
||||
init(id: String, actor: String, date: Date, status: IssueStatusEvent, pullRequest: Bool) {
|
||||
init(id: String, actor: String, commitHash: String?, date: Date, status: IssueStatusEvent, pullRequest: Bool) {
|
||||
self.id = id
|
||||
self.actor = actor
|
||||
self.commitHash = commitHash
|
||||
self.date = date
|
||||
self.status = status
|
||||
self.pullRequest = pullRequest
|
||||
|
||||
@@ -11,9 +11,14 @@ import IGListKit
|
||||
|
||||
final class IssueStatusEventSectionController: ListGenericSectionController<IssueStatusEventModel>, IssueStatusEventCellDelegate {
|
||||
|
||||
override init() {
|
||||
private let owner: String
|
||||
private let repo: String
|
||||
|
||||
init(owner: String, repo: String) {
|
||||
self.owner = owner
|
||||
self.repo = repo
|
||||
super.init()
|
||||
self.inset = Styles.Sizes.listInsetTight
|
||||
inset = Styles.Sizes.listInsetTight
|
||||
}
|
||||
|
||||
override func sizeForItem(at index: Int) -> CGSize {
|
||||
@@ -37,5 +42,10 @@ final class IssueStatusEventSectionController: ListGenericSectionController<Issu
|
||||
viewController?.presentProfile(login: actor)
|
||||
}
|
||||
|
||||
func didTapHash(cell: IssueStatusEventCell) {
|
||||
guard let hash = object?.commitHash else { return }
|
||||
viewController?.presentCommit(owner: owner, repo: repo, hash: hash)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -10,9 +10,6 @@
|
||||
290D2A3D1F044CB20082E6CC /* UIViewController+SmartDeselection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290D2A3C1F044CB20082E6CC /* UIViewController+SmartDeselection.swift */; };
|
||||
290D2A3F1F0466820082E6CC /* NotificationNavigation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290D2A3E1F0466820082E6CC /* NotificationNavigation.swift */; };
|
||||
290D2A421F04D3470082E6CC /* IssueStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290D2A411F04D3470082E6CC /* IssueStatus.swift */; };
|
||||
290D2A451F05ADDC0082E6CC /* IssueMergedModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290D2A441F05ADDC0082E6CC /* IssueMergedModel.swift */; };
|
||||
290D2A471F05AE640082E6CC /* IssueMergedCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290D2A461F05AE640082E6CC /* IssueMergedCell.swift */; };
|
||||
290D2A491F05B5B00082E6CC /* IssueMergedSectionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290D2A481F05B5B00082E6CC /* IssueMergedSectionController.swift */; };
|
||||
290EF5661F06A797006A2160 /* Notifications+Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290EF5651F06A794006A2160 /* Notifications+Filter.swift */; };
|
||||
290EF5671F06A798006A2160 /* Notifications+Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290EF5651F06A794006A2160 /* Notifications+Filter.swift */; };
|
||||
290EF56A1F06A821006A2160 /* Notification+NotificationViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290EF5691F06A7E1006A2160 /* Notification+NotificationViewModel.swift */; };
|
||||
@@ -214,9 +211,6 @@
|
||||
297DD5E11F061BBE006E7E63 /* CreateProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 297DD5E01F061BBE006E7E63 /* CreateProfileViewController.swift */; };
|
||||
297DD5E31F06922A006E7E63 /* NotificationClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 297DD5E21F06922A006E7E63 /* NotificationClient.swift */; };
|
||||
297DD5E71F06945C006E7E63 /* IssueStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290D2A411F04D3470082E6CC /* IssueStatus.swift */; };
|
||||
297DD5EB1F06946C006E7E63 /* IssueMergedModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290D2A441F05ADDC0082E6CC /* IssueMergedModel.swift */; };
|
||||
297DD5EC1F06946C006E7E63 /* IssueMergedCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290D2A461F05AE640082E6CC /* IssueMergedCell.swift */; };
|
||||
297DD5ED1F06946C006E7E63 /* IssueMergedSectionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290D2A481F05B5B00082E6CC /* IssueMergedSectionController.swift */; };
|
||||
297DD5F01F06948D006E7E63 /* NotificationClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 297DD5E21F06922A006E7E63 /* NotificationClient.swift */; };
|
||||
297DD5F11F06948D006E7E63 /* NotificationNavigation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290D2A3E1F0466820082E6CC /* NotificationNavigation.swift */; };
|
||||
297DD5F31F069497006E7E63 /* SettingsReportSectionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 291F99D61EFFFA2600CFBF78 /* SettingsReportSectionController.swift */; };
|
||||
@@ -343,7 +337,6 @@
|
||||
29C340091F1295F200EC8D40 /* GithubSessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 299F2A111EC3BCF0006CE9D7 /* GithubSessionManager.swift */; };
|
||||
29C3400A1F1295F200EC8D40 /* IssueDiffHunkPreviewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 292CD3C21F0AF3D400D3D57B /* IssueDiffHunkPreviewCell.swift */; };
|
||||
29C3400B1F1295F200EC8D40 /* UIColor+Hex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29A195011EC66B8B00C3E289 /* UIColor+Hex.swift */; };
|
||||
29C3400C1F1295F200EC8D40 /* IssueMergedSectionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290D2A481F05B5B00082E6CC /* IssueMergedSectionController.swift */; };
|
||||
29C3400D1F1295F200EC8D40 /* EmptyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29C167681ECA016500439D62 /* EmptyView.swift */; };
|
||||
29C3400E1F1295F200EC8D40 /* DateDetailsFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29A4768D1ED07A23005D0953 /* DateDetailsFormatter.swift */; };
|
||||
29C3400F1F1295F200EC8D40 /* IssueCommentCodeBlockModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 292FCACB1EDFCC510026635E /* IssueCommentCodeBlockModel.swift */; };
|
||||
@@ -396,12 +389,10 @@
|
||||
29C3403E1F1295F200EC8D40 /* GithubClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29C0E7061ECBC6C50051D756 /* GithubClient.swift */; };
|
||||
29C3403F1F1295F200EC8D40 /* NotificationRepoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29A195101EC7AC9500C3E289 /* NotificationRepoCell.swift */; };
|
||||
29C340401F1295F200EC8D40 /* GithubClient+AccessToken.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29416BFE1F1195D400D03E1A /* GithubClient+AccessToken.swift */; };
|
||||
29C340411F1295F200EC8D40 /* IssueMergedModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290D2A441F05ADDC0082E6CC /* IssueMergedModel.swift */; };
|
||||
29C340421F1295F200EC8D40 /* NotificationSectionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2980E0911F073E8B000E02C6 /* NotificationSectionController.swift */; };
|
||||
29C340431F1295F200EC8D40 /* IssueCommentTableCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2974069E1F0EDED3003A6BFB /* IssueCommentTableCollectionCell.swift */; };
|
||||
29C340441F1295F200EC8D40 /* UIView+BottomBorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 298BA08E1EC90FEE00B01946 /* UIView+BottomBorder.swift */; };
|
||||
29C340451F1295F200EC8D40 /* IssueCommentModelHandling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 292CD3C41F0C9EB200D3D57B /* IssueCommentModelHandling.swift */; };
|
||||
29C340461F1295F200EC8D40 /* IssueMergedCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290D2A461F05AE640082E6CC /* IssueMergedCell.swift */; };
|
||||
29C340471F1295F200EC8D40 /* IssueLabelsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 292FCAEF1EDFCC510026635E /* IssueLabelsModel.swift */; };
|
||||
29C340481F1295F200EC8D40 /* LabelableFields+IssueLabelModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2963A93A1EE25F6F0066509C /* LabelableFields+IssueLabelModel.swift */; };
|
||||
29C340491F1295F200EC8D40 /* NSAttributedStringSizing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 298BA08C1EC90A9000B01946 /* NSAttributedStringSizing.swift */; };
|
||||
@@ -539,9 +530,6 @@
|
||||
290D2A3C1F044CB20082E6CC /* UIViewController+SmartDeselection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+SmartDeselection.swift"; sourceTree = "<group>"; };
|
||||
290D2A3E1F0466820082E6CC /* NotificationNavigation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationNavigation.swift; sourceTree = "<group>"; };
|
||||
290D2A411F04D3470082E6CC /* IssueStatus.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IssueStatus.swift; sourceTree = "<group>"; };
|
||||
290D2A441F05ADDC0082E6CC /* IssueMergedModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IssueMergedModel.swift; sourceTree = "<group>"; };
|
||||
290D2A461F05AE640082E6CC /* IssueMergedCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IssueMergedCell.swift; sourceTree = "<group>"; };
|
||||
290D2A481F05B5B00082E6CC /* IssueMergedSectionController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IssueMergedSectionController.swift; sourceTree = "<group>"; };
|
||||
290EF5651F06A794006A2160 /* Notifications+Filter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Notifications+Filter.swift"; sourceTree = "<group>"; };
|
||||
290EF5691F06A7E1006A2160 /* Notification+NotificationViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Notification+NotificationViewModel.swift"; sourceTree = "<group>"; };
|
||||
290EF5751F06BA06006A2160 /* NoNewNotificationsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoNewNotificationsCell.swift; sourceTree = "<group>"; };
|
||||
@@ -776,16 +764,6 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
290D2A431F05ADD00082E6CC /* Merged */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
290D2A441F05ADDC0082E6CC /* IssueMergedModel.swift */,
|
||||
290D2A461F05AE640082E6CC /* IssueMergedCell.swift */,
|
||||
290D2A481F05B5B00082E6CC /* IssueMergedSectionController.swift */,
|
||||
);
|
||||
path = Merged;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2928C7861F15D7A30000D06D /* Renamed */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -835,7 +813,6 @@
|
||||
292FCAEA1EDFCC510026635E /* IssueViewModels.swift */,
|
||||
29FB942A1EE750720016E6D4 /* Labeled */,
|
||||
292FCAEC1EDFCC510026635E /* Labels */,
|
||||
290D2A431F05ADD00082E6CC /* Merged */,
|
||||
294563ED1EE5012900DBCD35 /* PullRequest+IssueType.swift */,
|
||||
29C53FBD1F12EF4000A59ED5 /* Referenced */,
|
||||
29C53FC11F12EF4000A59ED5 /* ReferencedCommit */,
|
||||
@@ -1688,7 +1665,6 @@
|
||||
299F2A121EC3BCF0006CE9D7 /* GithubSessionManager.swift in Sources */,
|
||||
292CD3C31F0AF3D400D3D57B /* IssueDiffHunkPreviewCell.swift in Sources */,
|
||||
29A195021EC66B8B00C3E289 /* UIColor+Hex.swift in Sources */,
|
||||
290D2A491F05B5B00082E6CC /* IssueMergedSectionController.swift in Sources */,
|
||||
29C167691ECA016500439D62 /* EmptyView.swift in Sources */,
|
||||
29A4768E1ED07A23005D0953 /* DateDetailsFormatter.swift in Sources */,
|
||||
292FCAF71EDFCC510026635E /* IssueCommentCodeBlockModel.swift in Sources */,
|
||||
@@ -1748,12 +1724,10 @@
|
||||
29C0E7071ECBC6C50051D756 /* GithubClient.swift in Sources */,
|
||||
29A195111EC7AC9500C3E289 /* NotificationRepoCell.swift in Sources */,
|
||||
29416BFF1F1195D400D03E1A /* GithubClient+AccessToken.swift in Sources */,
|
||||
290D2A451F05ADDC0082E6CC /* IssueMergedModel.swift in Sources */,
|
||||
2980E0921F073E8B000E02C6 /* NotificationSectionController.swift in Sources */,
|
||||
2974069F1F0EDED3003A6BFB /* IssueCommentTableCollectionCell.swift in Sources */,
|
||||
298BA08F1EC90FEE00B01946 /* UIView+BottomBorder.swift in Sources */,
|
||||
292CD3C51F0C9EB200D3D57B /* IssueCommentModelHandling.swift in Sources */,
|
||||
290D2A471F05AE640082E6CC /* IssueMergedCell.swift in Sources */,
|
||||
292FCB141EDFCC510026635E /* IssueLabelsModel.swift in Sources */,
|
||||
2963A93B1EE25F6F0066509C /* LabelableFields+IssueLabelModel.swift in Sources */,
|
||||
298BA08D1EC90A9000B01946 /* NSAttributedStringSizing.swift in Sources */,
|
||||
@@ -1835,7 +1809,6 @@
|
||||
2958408F1EEA00E1007723C6 /* IssueCommentTextCell.swift in Sources */,
|
||||
2958407A1EEA00E1007723C6 /* IssueCommentImageCell.swift in Sources */,
|
||||
295840961EEA00E1007723C6 /* IssueViewModels.swift in Sources */,
|
||||
297DD5EC1F06946C006E7E63 /* IssueMergedCell.swift in Sources */,
|
||||
29C295021EC7AF8C00D46CD2 /* NotificationCell.swift in Sources */,
|
||||
295F52E11EF1C2C9000B53CF /* CommentModelsFromMarkdown.swift in Sources */,
|
||||
29C295041EC7AF8C00D46CD2 /* NotificationType+Icon.swift in Sources */,
|
||||
@@ -1902,7 +1875,6 @@
|
||||
297DD5F51F06949E006E7E63 /* AppDelegate.swift in Sources */,
|
||||
295840BB1EEA00E1007723C6 /* SegmentedControlSectionController.swift in Sources */,
|
||||
297DD5F91F0694A3006E7E63 /* UIViewController+SmartDeselection.swift in Sources */,
|
||||
297DD5EB1F06946C006E7E63 /* IssueMergedModel.swift in Sources */,
|
||||
2980E0931F073E8B000E02C6 /* NotificationSectionController.swift in Sources */,
|
||||
29A476A51ED23FA2005D0953 /* Authorization.swift in Sources */,
|
||||
295840C71EEA00E1007723C6 /* GithubSessionManager.swift in Sources */,
|
||||
@@ -1955,7 +1927,6 @@
|
||||
29A476B21ED24D99005D0953 /* IssueTests.swift in Sources */,
|
||||
295840B81EEA00E1007723C6 /* Secrets.swift in Sources */,
|
||||
2981A8AA1EFF49EE00E25EF1 /* MMElement+CodeBlock.swift in Sources */,
|
||||
297DD5ED1F06946C006E7E63 /* IssueMergedSectionController.swift in Sources */,
|
||||
295840721EEA00E1007723C6 /* IssueStatusEventCell.swift in Sources */,
|
||||
295840C61EEA00E1007723C6 /* GithubClient.swift in Sources */,
|
||||
295840C31EEA00E1007723C6 /* Alamofire+GithubAPI.swift in Sources */,
|
||||
@@ -2005,7 +1976,6 @@
|
||||
29C340091F1295F200EC8D40 /* GithubSessionManager.swift in Sources */,
|
||||
29C3400A1F1295F200EC8D40 /* IssueDiffHunkPreviewCell.swift in Sources */,
|
||||
29C3400B1F1295F200EC8D40 /* UIColor+Hex.swift in Sources */,
|
||||
29C3400C1F1295F200EC8D40 /* IssueMergedSectionController.swift in Sources */,
|
||||
29C3400D1F1295F200EC8D40 /* EmptyView.swift in Sources */,
|
||||
29C3400E1F1295F200EC8D40 /* DateDetailsFormatter.swift in Sources */,
|
||||
29C3400F1F1295F200EC8D40 /* IssueCommentCodeBlockModel.swift in Sources */,
|
||||
@@ -2058,12 +2028,10 @@
|
||||
29C3403E1F1295F200EC8D40 /* GithubClient.swift in Sources */,
|
||||
29C3403F1F1295F200EC8D40 /* NotificationRepoCell.swift in Sources */,
|
||||
29C340401F1295F200EC8D40 /* GithubClient+AccessToken.swift in Sources */,
|
||||
29C340411F1295F200EC8D40 /* IssueMergedModel.swift in Sources */,
|
||||
29C340421F1295F200EC8D40 /* NotificationSectionController.swift in Sources */,
|
||||
29C340431F1295F200EC8D40 /* IssueCommentTableCollectionCell.swift in Sources */,
|
||||
29C340441F1295F200EC8D40 /* UIView+BottomBorder.swift in Sources */,
|
||||
29C340451F1295F200EC8D40 /* IssueCommentModelHandling.swift in Sources */,
|
||||
29C340461F1295F200EC8D40 /* IssueMergedCell.swift in Sources */,
|
||||
29C340471F1295F200EC8D40 /* IssueLabelsModel.swift in Sources */,
|
||||
29C340481F1295F200EC8D40 /* LabelableFields+IssueLabelModel.swift in Sources */,
|
||||
29C340491F1295F200EC8D40 /* NSAttributedStringSizing.swift in Sources */,
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>766</string>
|
||||
<string>773</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
|
||||
@@ -148,6 +148,10 @@ public final class IssueOrPullRequestQuery: GraphQLQuery {
|
||||
" ... on ClosedEvent {" +
|
||||
" __typename" +
|
||||
" ...nodeFields" +
|
||||
" closedCommit: commit {" +
|
||||
" __typename" +
|
||||
" oid" +
|
||||
" }" +
|
||||
" actor {" +
|
||||
" __typename" +
|
||||
" login" +
|
||||
@@ -325,6 +329,10 @@ public final class IssueOrPullRequestQuery: GraphQLQuery {
|
||||
" ... on ClosedEvent {" +
|
||||
" __typename" +
|
||||
" ...nodeFields" +
|
||||
" closedCommit: commit {" +
|
||||
" __typename" +
|
||||
" oid" +
|
||||
" }" +
|
||||
" actor {" +
|
||||
" __typename" +
|
||||
" login" +
|
||||
@@ -371,7 +379,7 @@ public final class IssueOrPullRequestQuery: GraphQLQuery {
|
||||
" ... on MergedEvent {" +
|
||||
" __typename" +
|
||||
" ...nodeFields" +
|
||||
" commit {" +
|
||||
" mergedCommit: commit {" +
|
||||
" __typename" +
|
||||
" oid" +
|
||||
" }" +
|
||||
@@ -792,6 +800,8 @@ public final class IssueOrPullRequestQuery: GraphQLQuery {
|
||||
public let actor: Actor?
|
||||
/// Identifies the date and time when the object was created.
|
||||
public let createdAt: String
|
||||
/// Identifies the commit associated with the 'closed' event.
|
||||
public let closedCommit: ClosedCommit?
|
||||
|
||||
public let fragments: Fragments
|
||||
|
||||
@@ -799,6 +809,7 @@ public final class IssueOrPullRequestQuery: GraphQLQuery {
|
||||
__typename = try reader.value(for: Field(responseName: "__typename"))
|
||||
actor = try reader.optionalValue(for: Field(responseName: "actor"))
|
||||
createdAt = try reader.value(for: Field(responseName: "createdAt"))
|
||||
closedCommit = try reader.optionalValue(for: Field(responseName: "closedCommit", fieldName: "commit"))
|
||||
|
||||
let nodeFields = try NodeFields(reader: reader)
|
||||
fragments = Fragments(nodeFields: nodeFields)
|
||||
@@ -818,6 +829,17 @@ public final class IssueOrPullRequestQuery: GraphQLQuery {
|
||||
login = try reader.value(for: Field(responseName: "login"))
|
||||
}
|
||||
}
|
||||
|
||||
public struct ClosedCommit: GraphQLMappable {
|
||||
public let __typename: String
|
||||
/// The Git object ID
|
||||
public let oid: String
|
||||
|
||||
public init(reader: GraphQLResultReader) throws {
|
||||
__typename = try reader.value(for: Field(responseName: "__typename"))
|
||||
oid = try reader.value(for: Field(responseName: "oid"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public struct AsReopenedEvent: GraphQLConditionalFragment {
|
||||
@@ -1504,6 +1526,8 @@ public final class IssueOrPullRequestQuery: GraphQLQuery {
|
||||
public let actor: Actor?
|
||||
/// Identifies the date and time when the object was created.
|
||||
public let createdAt: String
|
||||
/// Identifies the commit associated with the 'closed' event.
|
||||
public let closedCommit: ClosedCommit?
|
||||
|
||||
public let fragments: Fragments
|
||||
|
||||
@@ -1511,6 +1535,7 @@ public final class IssueOrPullRequestQuery: GraphQLQuery {
|
||||
__typename = try reader.value(for: Field(responseName: "__typename"))
|
||||
actor = try reader.optionalValue(for: Field(responseName: "actor"))
|
||||
createdAt = try reader.value(for: Field(responseName: "createdAt"))
|
||||
closedCommit = try reader.optionalValue(for: Field(responseName: "closedCommit", fieldName: "commit"))
|
||||
|
||||
let nodeFields = try NodeFields(reader: reader)
|
||||
fragments = Fragments(nodeFields: nodeFields)
|
||||
@@ -1530,6 +1555,17 @@ public final class IssueOrPullRequestQuery: GraphQLQuery {
|
||||
login = try reader.value(for: Field(responseName: "login"))
|
||||
}
|
||||
}
|
||||
|
||||
public struct ClosedCommit: GraphQLMappable {
|
||||
public let __typename: String
|
||||
/// The Git object ID
|
||||
public let oid: String
|
||||
|
||||
public init(reader: GraphQLResultReader) throws {
|
||||
__typename = try reader.value(for: Field(responseName: "__typename"))
|
||||
oid = try reader.value(for: Field(responseName: "oid"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public struct AsReopenedEvent: GraphQLConditionalFragment {
|
||||
@@ -1691,7 +1727,7 @@ public final class IssueOrPullRequestQuery: GraphQLQuery {
|
||||
/// Identifies the date and time when the object was created.
|
||||
public let createdAt: String
|
||||
/// Identifies the commit associated with the `merge` event.
|
||||
public let commit: Commit
|
||||
public let mergedCommit: MergedCommit
|
||||
|
||||
public let fragments: Fragments
|
||||
|
||||
@@ -1699,7 +1735,7 @@ public final class IssueOrPullRequestQuery: GraphQLQuery {
|
||||
__typename = try reader.value(for: Field(responseName: "__typename"))
|
||||
actor = try reader.optionalValue(for: Field(responseName: "actor"))
|
||||
createdAt = try reader.value(for: Field(responseName: "createdAt"))
|
||||
commit = try reader.value(for: Field(responseName: "commit"))
|
||||
mergedCommit = try reader.value(for: Field(responseName: "mergedCommit", fieldName: "commit"))
|
||||
|
||||
let nodeFields = try NodeFields(reader: reader)
|
||||
fragments = Fragments(nodeFields: nodeFields)
|
||||
@@ -1720,7 +1756,7 @@ public final class IssueOrPullRequestQuery: GraphQLQuery {
|
||||
}
|
||||
}
|
||||
|
||||
public struct Commit: GraphQLMappable {
|
||||
public struct MergedCommit: GraphQLMappable {
|
||||
public let __typename: String
|
||||
/// The Git object ID
|
||||
public let oid: String
|
||||
|
||||
@@ -37,6 +37,7 @@ query IssueOrPullRequest($owner: String!, $repo: String!, $number: Int!, $page_s
|
||||
}
|
||||
... on ClosedEvent {
|
||||
...nodeFields
|
||||
closedCommit: commit {oid}
|
||||
actor {login}
|
||||
createdAt
|
||||
}
|
||||
@@ -64,9 +65,7 @@ query IssueOrPullRequest($owner: String!, $repo: String!, $number: Int!, $page_s
|
||||
... on ReferencedEvent {
|
||||
createdAt
|
||||
...nodeFields
|
||||
refCommit: commit {
|
||||
oid
|
||||
}
|
||||
refCommit: commit {oid}
|
||||
actor {login}
|
||||
commitRepository {
|
||||
...referencedRepositoryFields
|
||||
@@ -151,6 +150,7 @@ query IssueOrPullRequest($owner: String!, $repo: String!, $number: Int!, $page_s
|
||||
}
|
||||
... on ClosedEvent {
|
||||
...nodeFields
|
||||
closedCommit: commit {oid}
|
||||
actor {login}
|
||||
createdAt
|
||||
}
|
||||
@@ -177,9 +177,7 @@ query IssueOrPullRequest($owner: String!, $repo: String!, $number: Int!, $page_s
|
||||
}
|
||||
... on MergedEvent {
|
||||
...nodeFields
|
||||
commit {
|
||||
oid
|
||||
}
|
||||
mergedCommit: commit {oid}
|
||||
actor {login}
|
||||
createdAt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user