added reddit, removed telegram

pull/40/head
James Sangalli 7 years ago
parent 76783a51ec
commit aac601bf7b
  1. 2
      Trust/Assets.xcassets/settings_reddit.imageset/Contents.json
  2. BIN
      Trust/Assets.xcassets/settings_reddit.imageset/reddit_icon.png
  3. BIN
      Trust/Assets.xcassets/settings_telegram.imageset/settings_telegram.png
  4. 2
      Trust/Settings/Types/Constants.swift
  5. 14
      Trust/Settings/Types/ServiceProvider.swift
  6. 2
      Trust/Settings/ViewControllers/SettingsViewController.swift

@ -10,7 +10,7 @@
},
{
"idiom" : "universal",
"filename" : "settings_telegram.png",
"filename" : "reddit_icon.png",
"scale" : "3x"
}
],

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 969 B

@ -12,7 +12,7 @@ public struct Constants {
// social
public static let website = "https://www.awallet.io/"
public static let twitterUsername = "Alpha_wallet"
public static let telegramUsername = "trustwallet"
public static let redditGroupName = "r/AlphaWallet/"
public static let facebookUsername = "AlphaWallet"
// support

@ -5,13 +5,13 @@ import UIKit
enum URLServiceProvider {
case twitter
case telegram
case reddit
case facebook
var title: String {
switch self {
case .twitter: return "Twitter"
case .telegram: return "Telegram Group"
case .reddit: return "Reddit"
case .facebook: return "Facebook"
}
}
@ -20,8 +20,8 @@ enum URLServiceProvider {
switch self {
case .twitter:
return URL(string: "twitter://user?screen_name=\(Constants.twitterUsername)")!
case .telegram:
return URL(string: "tg://resolve?domain=\(Constants.telegramUsername)")
case .reddit:
return URL(string: "reddit.com\(Constants.redditGroupName)")
case .facebook:
return URL(string: "fb://profile?id=\(Constants.facebookUsername)")
}
@ -35,8 +35,8 @@ enum URLServiceProvider {
switch self {
case .twitter:
return "https://twitter.com/\(Constants.twitterUsername)"
case .telegram:
return "https://telegram.me/\(Constants.telegramUsername)"
case .reddit:
return "https://reddit.com/\(Constants.redditGroupName)"
case .facebook:
return "https://www.facebook.com/\(Constants.facebookUsername)"
}
@ -45,7 +45,7 @@ enum URLServiceProvider {
var image: UIImage? {
switch self {
case .twitter: return R.image.settings_twitter()
case .telegram: return R.image.settings_telegram()
case .reddit: return R.image.settings_reddit()
case .facebook: return R.image.settings_facebook()
}
}

@ -195,7 +195,7 @@ class SettingsViewController: FormViewController {
+++ Section(NSLocalizedString("settings.community.label.title", value: "Community", comment: ""))
<<< linkProvider(type: .twitter)
<<< linkProvider(type: .telegram)
<<< linkProvider(type: .reddit)
<<< linkProvider(type: .facebook)
+++ Section(NSLocalizedString("settings.support.label.title", value: "Support", comment: ""))

Loading…
Cancel
Save