forked from zhiphe/Potatso-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
345 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// ActionRow.swift | ||
// Potatso | ||
// | ||
// Created by LEI on 8/4/16. | ||
// Copyright © 2016 TouchingApp. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import Eureka | ||
|
||
public final class ActionRow: _LabelRow, RowType { | ||
|
||
public required init(tag: String?) { | ||
super.init(tag: tag) | ||
} | ||
|
||
public override func updateCell() { | ||
super.updateCell() | ||
cell.selectionStyle = .Default | ||
cell.accessoryType = .DisclosureIndicator | ||
} | ||
|
||
public override func didSelect() { | ||
super.didSelect() | ||
cell.setSelected(false, animated: true) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// FeedbackManager.swift | ||
// Potatso | ||
// | ||
// Created by LEI on 8/4/16. | ||
// Copyright © 2016 TouchingApp. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import ICSMainFramework | ||
|
||
class FeedbackManager { | ||
static let shared = FeedbackManager() | ||
|
||
func showFeedback(inVC vc: UIViewController? = nil) { | ||
guard let currentVC = vc ?? UIApplication.sharedApplication().keyWindow?.rootViewController else { | ||
return | ||
} | ||
let options = [ | ||
"gotoConversationAfterContactUs": "YES" | ||
] | ||
let rulesets = Manager.sharedManager.defaultConfigGroup.ruleSets.map({ $0.name }).joinWithSeparator(", ") | ||
let defaultToProxy = Manager.sharedManager.defaultConfigGroup.defaultToProxy | ||
var tags: [String] = [] | ||
if AppEnv.isTestFlight { | ||
tags.append("testflight") | ||
} else if AppEnv.isAppStore { | ||
tags.append("store") | ||
} | ||
HelpshiftSupport.setMetadataBlock { () -> [NSObject : AnyObject]! in | ||
return [ | ||
"Full Version": AppEnv.fullVersion, | ||
"Default To Proxy": defaultToProxy ? "true": "false", | ||
"Rulesets": rulesets, | ||
HelpshiftSupportTagsKey: tags | ||
] | ||
} | ||
HelpshiftSupport.showConversation(currentVC, withOptions: options) | ||
} | ||
} |
Oops, something went wrong.