Skip to content

Commit

Permalink
Remove Telegram and Use Discord as the support channel. Closes #7108
Browse files Browse the repository at this point in the history
  • Loading branch information
hboon committed Apr 3, 2024
1 parent 0f418bd commit 50f7388
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 54 deletions.
11 changes: 3 additions & 8 deletions AlphaWallet/Common/Types/ServiceProvider.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// Copyright SIX DAY LLC. All rights reserved.

import Foundation
import AlphaWalletFoundation
import Foundation

public enum URLServiceProvider {
case discord
case telegramCustomer
case twitter
case reddit
case facebook
Expand All @@ -16,9 +15,7 @@ public enum URLServiceProvider {
public var deepLinkURL: URL? {
switch self {
case .discord:
return URL(string: "https://discord.com/invite/mx23YWRTYf")
case .telegramCustomer:
return URL(string: "https://t.me/AlphaWalletSupport")
return URL(string: "https://discord.gg/nbb9VSF85A")
case .twitter:
return URL(string: "twitter://user?screen_name=\(Constants.twitterUsername)")
case .reddit:
Expand All @@ -33,9 +30,7 @@ public enum URLServiceProvider {
public var remoteURL: URL {
switch self {
case .discord:
return URL(string: "https://discord.com/invite/mx23YWRTYf")!
case .telegramCustomer:
return URL(string: "https://t.me/AlphaWalletSupport")!
return URL(string: "https://discord.gg/nbb9VSF85A")!
case .twitter:
return URL(string: "https://twitter.com/\(Constants.twitterUsername)")!
case .reddit:
Expand Down
1 change: 0 additions & 1 deletion AlphaWallet/Localization/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,6 @@
"nonfungibles.value.rarity" = "%d%@ have this trait";
"nonfungibles.value.rarity.unique" = "Unique";
"url.discord" = "Discord";
"url.telegramCustomer" = "Telegram (Customer Support)";
"url.twitter" = "Twitter";
"url.reddit" = "Reddit";
"url.facebook" = "Facebook";
Expand Down
1 change: 0 additions & 1 deletion AlphaWallet/Localization/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,6 @@
"nonfungibles.value.rarity" = "%d%@ have this trait";
"nonfungibles.value.rarity.unique" = "Unique";
"url.discord" = "Discord";
"url.telegramCustomer" = "Telegram (Customer Support)";
"url.twitter" = "Twitter";
"url.reddit" = "Reddit";
"url.facebook" = "Facebook";
Expand Down
1 change: 0 additions & 1 deletion AlphaWallet/Localization/fi.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,6 @@
"nonfungibles.value.rarity" = "%d%@ have this trait";
"nonfungibles.value.rarity.unique" = "Unique";
"url.discord" = "Discord";
"url.telegramCustomer" = "Telegram (tuotetuki)";
"url.twitter" = "Twitter";
"url.reddit" = "Reddit";
"url.facebook" = "Facebook";
Expand Down
1 change: 0 additions & 1 deletion AlphaWallet/Localization/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,6 @@
"nonfungibles.value.rarity" = "%d%@ have this trait";
"nonfungibles.value.rarity.unique" = "Unique";
"url.discord" = "Discord";
"url.telegramCustomer" = "Telegram (Customer Support)";
"url.twitter" = "Twitter";
"url.reddit" = "Reddit";
"url.facebook" = "Facebook";
Expand Down
1 change: 0 additions & 1 deletion AlphaWallet/Localization/ko.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,6 @@
"nonfungibles.value.rarity" = "%d%@ have this trait";
"nonfungibles.value.rarity.unique" = "Unique";
"url.discord" = "Discord";
"url.telegramCustomer" = "Telegram (Customer Support)";
"url.twitter" = "Twitter";
"url.reddit" = "Reddit";
"url.facebook" = "Facebook";
Expand Down
1 change: 0 additions & 1 deletion AlphaWallet/Localization/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,6 @@
"nonfungibles.value.rarity" = "%d%@ have this trait";
"nonfungibles.value.rarity.unique" = "Unique";
"url.discord" = "Discord";
"url.telegramCustomer" = "Telegram (Customer Support)";
"url.twitter" = "Twitter";
"url.reddit" = "Reddit";
"url.facebook" = "Facebook";
Expand Down

This file was deleted.

Binary file not shown.
24 changes: 2 additions & 22 deletions AlphaWallet/Settings/ViewModels/SupportViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
// Created by Vladyslav Shepitko on 04.06.2020.
//

import UIKit
import AlphaWalletFoundation
import AlphaWalletLogger
import Combine
import UIKit

struct SupportViewModelInput {
let willAppear: AnyPublisher<Void, Never>
Expand All @@ -22,7 +22,7 @@ struct SupportViewModelOutput {

class SupportViewModel: NSObject {
private let analytics: AnalyticsLogger
private let supportedRows: [SupportCase] = [.telegramCustomer, .discord, .email, .twitter, .github, .faq]
private let supportedRows: [SupportCase] = [.discord, .email, .twitter, .github, .faq]

init(analytics: AnalyticsLogger) {
self.analytics = analytics
Expand Down Expand Up @@ -61,9 +61,6 @@ class SupportViewModel: NSObject {
case .discord:
logAccessDiscord()
return .openUrl(.discord)
case .telegramCustomer:
logAccessTelegramCustomerSupport()
return .openUrl(.telegramCustomer)
case .twitter:
logAccessTwitter()
return .openUrl(.twitter)
Expand Down Expand Up @@ -94,10 +91,6 @@ class SupportViewModel: NSObject {
analytics.log(navigation: Analytics.Navigation.discord)
}

private func logAccessTelegramCustomerSupport() {
analytics.log(navigation: Analytics.Navigation.telegramCustomerSupport)
}

private func logAccessTwitter() {
analytics.log(navigation: Analytics.Navigation.twitter)
}
Expand Down Expand Up @@ -136,7 +129,6 @@ extension SupportViewModel {

enum SupportCase: String {
case discord
case telegramCustomer
case twitter
case reddit
case facebook
Expand All @@ -154,13 +146,10 @@ extension SupportViewModel {
}

extension SupportViewModel.SupportCase {

var urlProvider: URLServiceProvider? {
switch self {
case .discord:
return URLServiceProvider.discord
case .telegramCustomer:
return URLServiceProvider.telegramCustomer
case .twitter:
return URLServiceProvider.twitter
case .reddit:
Expand All @@ -180,8 +169,6 @@ extension SupportViewModel.SupportCase {
switch self {
case .discord:
return URLServiceProvider.discord.title
case .telegramCustomer:
return URLServiceProvider.telegramCustomer.title
case .twitter:
return URLServiceProvider.twitter.title
case .reddit:
Expand All @@ -205,8 +192,6 @@ extension SupportViewModel.SupportCase {
return R.image.iconsSettingsEmail()
case .discord:
return URLServiceProvider.discord.image
case .telegramCustomer:
return URLServiceProvider.telegramCustomer.image
case .twitter:
return URLServiceProvider.twitter.image
case .reddit:
Expand All @@ -224,13 +209,10 @@ extension SupportViewModel.SupportCase {
}

extension URLServiceProvider {

var title: String {
switch self {
case .discord:
return R.string.localizable.urlDiscord()
case .telegramCustomer:
return R.string.localizable.urlTelegramCustomer()
case .twitter:
return R.string.localizable.urlTwitter()
case .reddit:
Expand All @@ -248,8 +230,6 @@ extension URLServiceProvider {
switch self {
case .discord:
return R.image.iconsSettingsDiscord()
case .telegramCustomer:
return R.image.settings_telegram()
case .twitter:
return R.image.settings_twitter()
case .reddit:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public enum Analytics {
case deepLink = "Screen: DeepLink"
case faq = "Screen: FAQ"
case discord = "Screen: Discord"
case telegramCustomerSupport = "Screen: Telegram: Customer Support"
case twitter = "Screen: Twitter"
case reddit = "Screen: Reddit"
case facebook = "Screen: Facebook"
Expand Down Expand Up @@ -259,8 +258,8 @@ public enum Analytics {
}

public enum WalletConnectAction: String {
case bridgeUrl
case connectionUrl
case bridgeUrl
case connectionUrl
}

public enum ShortcutType: String {
Expand Down

0 comments on commit 50f7388

Please sign in to comment.