Drop Twitch link
This commit is contained in:
parent
ab89c2e546
commit
0d64f15605
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Drop Twitch link.
|
||||||
|
|
||||||
## 1.15.1 (2021-02-14)
|
## 1.15.1 (2021-02-14)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -52,7 +52,6 @@ class OrganizerViewController: UITableViewController, StrongTableHost {
|
||||||
|
|
||||||
func reloadModel() {
|
func reloadModel() {
|
||||||
model.clear()
|
model.clear()
|
||||||
model.add(.twitch)
|
|
||||||
model.add(.vpn)
|
model.add(.vpn)
|
||||||
model.add(.providers)
|
model.add(.providers)
|
||||||
model.add(.hosts)
|
model.add(.hosts)
|
||||||
|
@ -67,11 +66,9 @@ class OrganizerViewController: UITableViewController, StrongTableHost {
|
||||||
}
|
}
|
||||||
model.add(.about)
|
model.add(.about)
|
||||||
model.add(.destruction)
|
model.add(.destruction)
|
||||||
model.setHeader(L10n.Core.Organizer.Sections.Twitch.header, forSection: .twitch)
|
|
||||||
model.setHeader(L10n.App.Service.Sections.Vpn.header, forSection: .vpn)
|
model.setHeader(L10n.App.Service.Sections.Vpn.header, forSection: .vpn)
|
||||||
model.setHeader(L10n.Core.Organizer.Sections.Providers.header, forSection: .providers)
|
model.setHeader(L10n.Core.Organizer.Sections.Providers.header, forSection: .providers)
|
||||||
model.setHeader(L10n.Core.Organizer.Sections.Hosts.header, forSection: .hosts)
|
model.setHeader(L10n.Core.Organizer.Sections.Hosts.header, forSection: .hosts)
|
||||||
model.setFooter(L10n.Core.Organizer.Sections.Twitch.footer, forSection: .twitch)
|
|
||||||
model.setFooter(L10n.Core.Organizer.Sections.Providers.footer, forSection: .providers)
|
model.setFooter(L10n.Core.Organizer.Sections.Providers.footer, forSection: .providers)
|
||||||
model.setFooter(L10n.Core.Organizer.Sections.Hosts.footer, forSection: .hosts)
|
model.setFooter(L10n.Core.Organizer.Sections.Hosts.footer, forSection: .hosts)
|
||||||
if #available(iOS 12, *) {
|
if #available(iOS 12, *) {
|
||||||
|
@ -80,7 +77,6 @@ class OrganizerViewController: UITableViewController, StrongTableHost {
|
||||||
model.set([.siriShortcuts], forSection: .siri)
|
model.set([.siriShortcuts], forSection: .siri)
|
||||||
}
|
}
|
||||||
model.setHeader(L10n.Core.Organizer.Sections.Support.header, forSection: .support)
|
model.setHeader(L10n.Core.Organizer.Sections.Support.header, forSection: .support)
|
||||||
model.set([.followTwitch], forSection: .twitch)
|
|
||||||
model.set([.connectionStatus], forSection: .vpn)
|
model.set([.connectionStatus], forSection: .vpn)
|
||||||
model.set([.donate, .githubSponsors, .joinCommunity], forSection: .support)
|
model.set([.donate, .githubSponsors, .joinCommunity], forSection: .support)
|
||||||
|
|
||||||
|
@ -188,15 +184,6 @@ class OrganizerViewController: UITableViewController, StrongTableHost {
|
||||||
|
|
||||||
// MARK: Actions
|
// MARK: Actions
|
||||||
|
|
||||||
private func followOnTwitch() {
|
|
||||||
let app = UIApplication.shared
|
|
||||||
if app.canOpenURL(AppConstants.URLs.twitch) {
|
|
||||||
app.open(AppConstants.URLs.twitch, options: [:], completionHandler: nil)
|
|
||||||
} else {
|
|
||||||
app.open(AppConstants.URLs.twitchFallback, options: [:], completionHandler: nil)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private func enterProfile(_ profile: ConnectionProfile) {
|
private func enterProfile(_ profile: ConnectionProfile) {
|
||||||
perform(segue: StoryboardSegue.Organizer.selectProfileSegueIdentifier, sender: profile)
|
perform(segue: StoryboardSegue.Organizer.selectProfileSegueIdentifier, sender: profile)
|
||||||
}
|
}
|
||||||
|
@ -427,8 +414,6 @@ class OrganizerViewController: UITableViewController, StrongTableHost {
|
||||||
|
|
||||||
extension OrganizerViewController {
|
extension OrganizerViewController {
|
||||||
enum SectionType: Int {
|
enum SectionType: Int {
|
||||||
case twitch
|
|
||||||
|
|
||||||
case vpn
|
case vpn
|
||||||
|
|
||||||
case providers
|
case providers
|
||||||
|
@ -449,8 +434,6 @@ extension OrganizerViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
enum RowType: Int {
|
enum RowType: Int {
|
||||||
case followTwitch
|
|
||||||
|
|
||||||
case connectionStatus
|
case connectionStatus
|
||||||
|
|
||||||
case profile
|
case profile
|
||||||
|
@ -510,12 +493,6 @@ extension OrganizerViewController {
|
||||||
|
|
||||||
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||||
switch model.row(at: indexPath) {
|
switch model.row(at: indexPath) {
|
||||||
case .followTwitch:
|
|
||||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
|
||||||
cell.applyAction(.current)
|
|
||||||
cell.leftText = L10n.Core.Organizer.Cells.FollowTwitch.caption
|
|
||||||
return cell
|
|
||||||
|
|
||||||
case .connectionStatus:
|
case .connectionStatus:
|
||||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||||
cell.applyVPN(.current, with: VPN.shared.isEnabled ? VPN.shared.status : nil, error: nil)
|
cell.applyVPN(.current, with: VPN.shared.isEnabled ? VPN.shared.status : nil, error: nil)
|
||||||
|
@ -614,9 +591,6 @@ extension OrganizerViewController {
|
||||||
|
|
||||||
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||||
switch model.row(at: indexPath) {
|
switch model.row(at: indexPath) {
|
||||||
case .followTwitch:
|
|
||||||
followOnTwitch()
|
|
||||||
|
|
||||||
case .connectionStatus:
|
case .connectionStatus:
|
||||||
enterActiveProfile()
|
enterActiveProfile()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue