mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-03-30 17:13:47 +08:00
30 lines
671 B
Swift
30 lines
671 B
Swift
//
|
|
// IssueCommentModel+Inset.swift
|
|
// Freetime
|
|
//
|
|
// Created by Ryan Nystrom on 12/30/17.
|
|
// Copyright © 2017 Ryan Nystrom. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
extension IssueCommentModel {
|
|
|
|
var commentSectionControllerInset: UIEdgeInsets {
|
|
switch threadState {
|
|
case .single:
|
|
// title and other header objects will have bottom insetting
|
|
if isRoot {
|
|
return UIEdgeInsets(top: Styles.Sizes.rowSpacing, left: 0, bottom: 0, right: 0)
|
|
} else {
|
|
return .zero
|
|
}
|
|
case .neck:
|
|
return .zero
|
|
case .tail:
|
|
return .zero
|
|
}
|
|
}
|
|
|
|
}
|