diff --git a/Tusker/Screens/Preferences/AdvancedTableViewController.swift b/Tusker/Screens/Preferences/AdvancedTableViewController.swift deleted file mode 100644 index a8ebdd942d..0000000000 --- a/Tusker/Screens/Preferences/AdvancedTableViewController.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// AdvancedTableViewController.swift -// Tusker -// -// Created by Shadowfacts on 1/12/19. -// Copyright © 2019 Shadowfacts. All rights reserved. -// - -import UIKit -import Pachyderm - -class AdvancedTableViewController: UITableViewController { - - @IBOutlet weak var postContentTypeLabel: UILabel! - - override func viewDidLoad() { - super.viewDidLoad() - - postContentTypeLabel.text = Preferences.shared.statusContentType.displayName - } - - override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - guard indexPath.section == 1 && indexPath.row == 0 else { - return - } - tableView.deselectRow(at: indexPath, animated: true) - - let alertController = UIAlertController(title: "Post Content Type", message: nil, preferredStyle: .actionSheet) - for contentType in StatusContentType.allCases { - let action = UIAlertAction(title: contentType.displayName, style: .default) { (_) in - Preferences.shared.statusContentType = contentType - self.postContentTypeLabel.text = contentType.displayName - } - if contentType == Preferences.shared.statusContentType { - action.setValue(true, forKey: "checked") - } - alertController.addAction(action) - } - alertController.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil)) - present(alertController, animated: true) - } - -} - -extension StatusContentType { - var displayName: String { - switch self { - case .plain: - return "Plain" - case .markdown: - return "Markdown" - case .html: - return "HTML" - } - } -} diff --git a/Tusker/Screens/Preferences/AppearanceTableViewController.swift b/Tusker/Screens/Preferences/AppearanceTableViewController.swift deleted file mode 100644 index 1e9d8ce0cf..0000000000 --- a/Tusker/Screens/Preferences/AppearanceTableViewController.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// AppearanceTableViewController.swift -// Tusker -// -// Created by Shadowfacts on 10/2/18. -// Copyright © 2018 Shadowfacts. All rights reserved. -// - -import UIKit - -class AppearanceTableViewController: UITableViewController { - - @IBOutlet weak var showRepliesInProfilesSwitch: UISwitch! - @IBOutlet weak var circularAvatarsSwitch: UISwitch! - @IBOutlet weak var hideCustomEmojiInUsernamesSwitch: UISwitch! - - override func viewDidLoad() { - super.viewDidLoad() - - showRepliesInProfilesSwitch.setOn(Preferences.shared.showRepliesInProfiles, animated: false) - circularAvatarsSwitch.setOn(Preferences.shared.avatarStyle == .circle, animated: false) - hideCustomEmojiInUsernamesSwitch.setOn(Preferences.shared.hideCustomEmojiInUsernames, animated: false) - } - - /* - // MARK: - Navigation - - // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepare(for segue: UIStoryboardSegue, sender: Any?) { - // Get the new view controller using segue.destination. - // Pass the selected object to the new view controller. - } - */ - - // MARK: - Interaction - - @IBAction func showRepliesInProfilesChanged(_ sender: Any) { - Preferences.shared.showRepliesInProfiles = showRepliesInProfilesSwitch.isOn - } - - @IBAction func circularAvatarsChanged(_ sender: Any) { - Preferences.shared.avatarStyle = circularAvatarsSwitch.isOn ? .circle : .roundRect - } - - @IBAction func hideCustomEmojiInUsernamesChanged(_ sender: Any) { - Preferences.shared.hideCustomEmojiInUsernames = hideCustomEmojiInUsernamesSwitch.isOn - } - -} diff --git a/Tusker/Screens/Preferences/BehaviorTableViewController.swift b/Tusker/Screens/Preferences/BehaviorTableViewController.swift deleted file mode 100644 index c72ba06ad6..0000000000 --- a/Tusker/Screens/Preferences/BehaviorTableViewController.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// BehaviorTableViewController.swift -// Tusker -// -// Created by Shadowfacts on 10/23/18. -// Copyright © 2018 Shadowfacts. All rights reserved. -// - -import UIKit - -class BehaviorTableViewController: UITableViewController { - - @IBOutlet weak var defaultPostVisibilityLabel: UILabel! - @IBOutlet weak var automaticallySaveDraftsSwitch: UISwitch! - @IBOutlet weak var openLinksInAppsSwitch: UISwitch! - - override func viewDidLoad() { - super.viewDidLoad() - - defaultPostVisibilityLabel.text = Preferences.shared.defaultPostVisibility.displayName - automaticallySaveDraftsSwitch.setOn(Preferences.shared.automaticallySaveDrafts, animated: false) - openLinksInAppsSwitch.setOn(Preferences.shared.openLinksInApps, animated: false) - } - - override func tableView(_ tableView: UITableView, willSelectRowAt indexPath: IndexPath) -> IndexPath? { - if indexPath.row == 0 { - return indexPath - } else { - return nil - } - } - - override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - tableView.deselectRow(at: indexPath, animated: true) - - let alertController = UIAlertController(currentVisibility: Preferences.shared.defaultPostVisibility) { (visibility) in - guard let visibility = visibility else { return } - Preferences.shared.defaultPostVisibility = visibility - self.defaultPostVisibilityLabel.text = visibility.displayName - } - present(alertController, animated: true) - } - - @IBAction func automaticallySaveDraftsChanged(_ sender: Any) { - Preferences.shared.automaticallySaveDrafts = automaticallySaveDraftsSwitch.isOn - } - - @IBAction func openLinksInAppsChanged(_ sender: Any) { - Preferences.shared.openLinksInApps = openLinksInAppsSwitch.isOn - } - - -} diff --git a/Tusker/Screens/Preferences/Preferences.storyboard b/Tusker/Screens/Preferences/Preferences.storyboard deleted file mode 100644 index ac24a88fe3..0000000000 --- a/Tusker/Screens/Preferences/Preferences.storyboard +++ /dev/null @@ -1,464 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This option is only supported for Pleroma instances with formatting enabled. On all other instances, formatting symbols will remain in the plain, unformatted text. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tusker/Screens/Preferences/PreferencesTableViewController.swift b/Tusker/Screens/Preferences/PreferencesTableViewController.swift deleted file mode 100644 index 26607b9ef0..0000000000 --- a/Tusker/Screens/Preferences/PreferencesTableViewController.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// PreferencesTableViewController.swift -// Tusker -// -// Created by Shadowfacts on 8/28/18. -// Copyright © 2018 Shadowfacts. All rights reserved. -// - -import UIKit - -class PreferencesTableViewController: UITableViewController { - - static func create() -> UINavigationController { - guard let navigationController = UIStoryboard(name: "Preferences", bundle: nil).instantiateInitialViewController() as? UINavigationController else { fatalError() } - return navigationController - } - - @IBAction func donePressed(_ sender: Any) { - dismiss(animated: true) - } - -} diff --git a/Tusker/Screens/Preferences/SilentActionPermissionsTableViewController.swift b/Tusker/Screens/Preferences/SilentActionPermissionsTableViewController.swift deleted file mode 100644 index 047bfcb50e..0000000000 --- a/Tusker/Screens/Preferences/SilentActionPermissionsTableViewController.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// SilentActionPermissionsTableViewController.swift -// Tusker -// -// Created by Shadowfacts on 9/30/18. -// Copyright © 2018 Shadowfacts. All rights reserved. -// - -import UIKit - -class SilentActionPermissionsTableViewController: UITableViewController { - - override func viewDidLoad() { - super.viewDidLoad() - - tableView.register(UINib(nibName: "SilentActionPermissionCell", bundle: nil), forCellReuseIdentifier: "permissionCell") - } - - // MARK: - Table view data source - - override func numberOfSections(in tableView: UITableView) -> Int { - return 1 - } - - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return Preferences.shared.silentActions.count - } - - override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - guard let cell = tableView.dequeueReusableCell(withIdentifier: "permissionCell", for: indexPath) as? SilentActionPermissionTableViewCell else { fatalError() } - - let index = Preferences.shared.silentActions.index(Preferences.shared.silentActions.startIndex, offsetBy: indexPath.row) - let (source, permission) = Preferences.shared.silentActions[index] - cell.updateUI(source: source, permission: permission) - - return cell - } - - /* - // MARK: - Navigation - - // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepare(for segue: UIStoryboardSegue, sender: Any?) { - // Get the new view controller using segue.destination. - // Pass the selected object to the new view controller. - } - */ - -}