remove sample hardcode

This commit is contained in:
Ryan Nystrom
2017-07-23 14:04:38 -06:00
parent c7cc4c317d
commit cec959790d
2 changed files with 10 additions and 2 deletions

View File

@@ -23,8 +23,13 @@ IssueCommentAutocompleteDelegate {
private let repo: String
private let number: Int
private var addCommentClient: AddCommentClient? = nil {
didSet {
self.setTextInputbarHidden(addCommentClient == nil, animated: true)
}
}
private let autocomplete = IssueCommentAutocomplete(autocompletes: [EmojiAutocomplete()])
private var addCommentClient: AddCommentClient? = nil
private var models = [ListDiffable]()
lazy private var feed: Feed = { Feed(viewController: self, delegate: self, collectionView: self.collectionView) }()
@@ -65,6 +70,9 @@ IssueCommentAutocompleteDelegate {
rightButton.setTitle(NSLocalizedString("Send", comment: ""), for: .normal)
rightButton.setTitleColor(Styles.Colors.Blue.medium.color, for: .normal)
// displayed once an add comment client is created (requires a gql subject id)
setTextInputbarHidden(true, animated: false)
let rightItem = UIBarButtonItem(
image: UIImage(named: "bullets-hollow"),
style: .plain,

View File

@@ -9,7 +9,7 @@
import Foundation
func runningInSample() -> Bool {
return true || Bundle.main.object(forInfoDictionaryKey: "RUN_AS_SAMPLE") as? Bool ?? false
return Bundle.main.object(forInfoDictionaryKey: "RUN_AS_SAMPLE") as? Bool ?? false
}
func sampleUserSession() -> GithubUserSession? {