Skip to content

Commit

Permalink
[iOS] Fixes summit website and code of conduct links.
Browse files Browse the repository at this point in the history
  • Loading branch information
gcutrini committed Mar 7, 2019
1 parent 6653735 commit 722c200
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions OpenStack Summit/OpenStack Summit/AboutViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,28 @@ final class AboutViewController: UITableViewController, RevealViewController, Em

@IBAction func showLink(_ sender: UIButton) {

var summitWebsite = "https://www.openstack.org"
var codeOfConduct = "https://www.openstack.org/legal/community-code-of-conduct"

if let summitManagedObject = self.currentSummit {

summitWebsite = summitManagedObject.webpageURL
codeOfConduct = "\(summitWebsite)/code-of-conduct"
}

let link = Link(rawValue: sender.tag)!

switch link {

case .openStackWebsite:
case .summitWebsite:

let url = URL(string: "https://openstack.org")!
let url = URL(string: summitWebsite)!

open(url)

case .codeOfConduct:

let url = URL(string: "https://www.openstack.org/summit/barcelona-2016/code-of-conduct")!
let url = URL(string: codeOfConduct)!

open(url)

Expand Down Expand Up @@ -378,7 +387,7 @@ private extension AboutViewController {

enum Link: Int {

case openStackWebsite
case summitWebsite
case codeOfConduct
case appSupport
case generalInquiries
Expand Down

0 comments on commit 722c200

Please sign in to comment.