Skip to content

Commit

Permalink
1.1.3 fix bug in settings tap source code
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin49999 committed Jan 9, 2025
1 parent 023259b commit 8cfbf54
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
17 changes: 12 additions & 5 deletions Classes/Controllers/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,24 @@

import UIKit

fileprivate let githubUrl = URL(string: "https://github.com/kevin49999/Go-iOS")!

class SettingsViewController: UITableViewController {
enum Rows: Int {
case emojiFeedback
case suicide
case ko
case haptics
case source
}

@IBOutlet weak var emojiFeedbackSwitch: UISwitch!
@IBOutlet weak var suicideDetectionSwitch: UISwitch!
@IBOutlet weak var koSwitch: UISwitch!
@IBOutlet weak var hapticsSwitch: UISwitch!

let githubUrl = URL(string: "https://github.com/kevin49999/Go-iOS")!


override func viewDidLoad() {
super.viewDidLoad()

emojiFeedbackSwitch.isOn = Settings.emojiFeedback()
suicideDetectionSwitch.isOn = Settings.suicide()
koSwitch.isOn = Settings.ko()
Expand All @@ -42,7 +49,7 @@ class SettingsViewController: UITableViewController {
}

override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if indexPath.row == 3 {
if let row = Rows(rawValue: indexPath.row), row == .source {
UIApplication.shared.open(githubUrl)
}
}
Expand Down
4 changes: 2 additions & 2 deletions Go.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.2;
MARKETING_VERSION = 1.1.3;
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -D PRODUCTION";
PRODUCT_BUNDLE_IDENTIFIER = com.ffr.go;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -570,7 +570,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.2;
MARKETING_VERSION = 1.1.3;
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -D PRODUCTION";
PRODUCT_BUNDLE_IDENTIFIER = com.ffr.go;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down

0 comments on commit 8cfbf54

Please sign in to comment.