Remove old Preferences view code

This commit is contained in:
Shadowfacts 2019-07-27 21:43:02 -04:00
parent a1c6a34f54
commit 2afe98cf77
Signed by untrusted user: shadowfacts
GPG Key ID: 94A5AB95422746E5
6 changed files with 0 additions and 693 deletions

View File

@ -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"
}
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -1,464 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14810.11" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="VJJ-jC-9g8">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14766.13"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
<capability name="iOS 13.0 system colors" minToolsVersion="11.0"/>
</dependencies>
<scenes>
<!--Preferences-->
<scene sceneID="PD7-d3-cFe">
<objects>
<tableViewController id="ArB-e7-yko" customClass="PreferencesTableViewController" customModule="Tusker" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="insetGrouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="JGC-f9-j7V">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<sections>
<tableViewSection id="L3p-2V-jca">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="RYV-cK-4my">
<rect key="frame" x="16" y="18" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="RYV-cK-4my" id="Vmf-7I-FNS">
<rect key="frame" x="0.0" y="0.0" width="316.5" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Appearance" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Mb9-q2-iNW">
<rect key="frame" x="16" y="11.5" width="93" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="Mb9-q2-iNW" firstAttribute="centerY" secondItem="Vmf-7I-FNS" secondAttribute="centerY" id="3QP-UK-jxr"/>
<constraint firstItem="Mb9-q2-iNW" firstAttribute="leading" secondItem="Vmf-7I-FNS" secondAttribute="leadingMargin" constant="8" id="yi1-5N-Tbj"/>
</constraints>
</tableViewCellContentView>
<connections>
<segue destination="oM9-mi-wRc" kind="show" id="G45-fS-Nsj"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="58g-Zq-ZuE">
<rect key="frame" x="16" y="62" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="58g-Zq-ZuE" id="4bV-t8-TdS">
<rect key="frame" x="0.0" y="0.0" width="316.5" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Behavior" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8XT-eR-Gzo">
<rect key="frame" x="16" y="11.5" width="67" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="8XT-eR-Gzo" firstAttribute="leading" secondItem="4bV-t8-TdS" secondAttribute="leadingMargin" constant="8" id="Fe9-Ba-kbK"/>
<constraint firstItem="8XT-eR-Gzo" firstAttribute="centerY" secondItem="4bV-t8-TdS" secondAttribute="centerY" id="huw-Dv-Z4B"/>
</constraints>
</tableViewCellContentView>
<connections>
<segue destination="Nk9-yO-78a" kind="show" id="PFV-VR-Ujc"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="eQh-JA-eyx">
<rect key="frame" x="16" y="106" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="eQh-JA-eyx" id="2y5-gN-4xJ">
<rect key="frame" x="0.0" y="0.0" width="316.5" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Advanced" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SWr-6T-ZL5">
<rect key="frame" x="16" y="11.5" width="77" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="SWr-6T-ZL5" firstAttribute="leading" secondItem="2y5-gN-4xJ" secondAttribute="leadingMargin" constant="8" id="1hJ-fj-Llf"/>
<constraint firstItem="SWr-6T-ZL5" firstAttribute="centerY" secondItem="2y5-gN-4xJ" secondAttribute="centerY" id="Qao-fy-t0w"/>
</constraints>
</tableViewCellContentView>
<connections>
<segue destination="3mv-l7-6We" kind="show" id="v4C-bk-CFc"/>
</connections>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
<connections>
<outlet property="dataSource" destination="ArB-e7-yko" id="Kxa-qc-mae"/>
<outlet property="delegate" destination="ArB-e7-yko" id="BFj-a8-oE6"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Preferences" id="dN7-yl-voz">
<barButtonItem key="rightBarButtonItem" style="done" systemItem="done" id="k5d-0p-0Yf">
<connections>
<action selector="donePressed:" destination="ArB-e7-yko" id="6na-ww-vm4"/>
</connections>
</barButtonItem>
</navigationItem>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="GBL-Cz-yNZ" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="825" y="-234"/>
</scene>
<!--Appearance-->
<scene sceneID="Dvq-ZP-V7u">
<objects>
<tableViewController id="oM9-mi-wRc" customClass="AppearanceTableViewController" customModule="Tusker" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="insetGrouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="zP4-rb-dsB">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<sections>
<tableViewSection headerTitle="Display" id="gwC-db-0ec">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="cSJ-mP-CMQ">
<rect key="frame" x="16" y="55.5" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="cSJ-mP-CMQ" id="K0u-vm-1cA">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Show Replies in Profiles" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lhL-hU-TwV">
<rect key="frame" x="16" y="11.5" width="182" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="1r3-n8-8xm">
<rect key="frame" x="286" y="6.5" width="51" height="31"/>
<connections>
<action selector="showRepliesInProfilesChanged:" destination="oM9-mi-wRc" eventType="valueChanged" id="2T6-AX-x81"/>
<action selector="showRepliesInProfilesChanged:" destination="ArB-e7-yko" eventType="valueChanged" id="4Dp-OY-jWt"/>
</connections>
</switch>
</subviews>
<constraints>
<constraint firstItem="lhL-hU-TwV" firstAttribute="leading" secondItem="K0u-vm-1cA" secondAttribute="leadingMargin" constant="8" id="QM5-y3-iGB"/>
<constraint firstItem="lhL-hU-TwV" firstAttribute="centerY" secondItem="K0u-vm-1cA" secondAttribute="centerY" id="Xq4-5w-m1n"/>
<constraint firstItem="1r3-n8-8xm" firstAttribute="centerY" secondItem="K0u-vm-1cA" secondAttribute="centerY" id="aC7-WR-8R4"/>
<constraint firstAttribute="trailing" secondItem="1r3-n8-8xm" secondAttribute="trailing" constant="8" id="co5-zL-DP5"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="KRM-HM-H3l">
<rect key="frame" x="16" y="99.5" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="KRM-HM-H3l" id="1OA-09-UkD">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Use Circular Avatars" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="U0d-1s-1mq">
<rect key="frame" x="16" y="11.5" width="155" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Huh-Lk-M4J">
<rect key="frame" x="286" y="6.5" width="51" height="31"/>
<connections>
<action selector="circularAvatarsChanged:" destination="oM9-mi-wRc" eventType="valueChanged" id="Jd1-cu-AUu"/>
</connections>
</switch>
</subviews>
<constraints>
<constraint firstItem="U0d-1s-1mq" firstAttribute="leading" secondItem="1OA-09-UkD" secondAttribute="leadingMargin" constant="8" id="RpK-YC-s0g"/>
<constraint firstItem="U0d-1s-1mq" firstAttribute="centerY" secondItem="1OA-09-UkD" secondAttribute="centerY" id="TzO-tq-5ab"/>
<constraint firstItem="Huh-Lk-M4J" firstAttribute="centerY" secondItem="1OA-09-UkD" secondAttribute="centerY" id="c9P-0f-jL9"/>
<constraint firstAttribute="trailing" secondItem="Huh-Lk-M4J" secondAttribute="trailing" constant="8" id="dZP-bT-whk"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="KoZ-lA-gof">
<rect key="frame" x="16" y="143.5" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="KoZ-lA-gof" id="ZiQ-kq-AHv">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Hide Custom Emoji in Usernames" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fM0-HA-l0w">
<rect key="frame" x="16" y="11.5" width="255" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="XJI-I2-vRF">
<rect key="frame" x="286" y="6.5" width="51" height="31"/>
<connections>
<action selector="hideCustomEmojiInUsernamesChanged:" destination="oM9-mi-wRc" eventType="valueChanged" id="dPX-Di-Ie4"/>
</connections>
</switch>
</subviews>
<constraints>
<constraint firstItem="fM0-HA-l0w" firstAttribute="leading" secondItem="ZiQ-kq-AHv" secondAttribute="leadingMargin" constant="8" id="CkT-N0-BAq"/>
<constraint firstItem="fM0-HA-l0w" firstAttribute="centerY" secondItem="ZiQ-kq-AHv" secondAttribute="centerY" id="ko9-pK-miM"/>
<constraint firstAttribute="trailing" secondItem="XJI-I2-vRF" secondAttribute="trailing" constant="8" id="oCf-HZ-z6n"/>
<constraint firstItem="XJI-I2-vRF" firstAttribute="centerY" secondItem="ZiQ-kq-AHv" secondAttribute="centerY" id="tti-fN-d32"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection headerTitle="Interaction" id="2hR-aI-CRP">
<cells/>
</tableViewSection>
</sections>
<connections>
<outlet property="dataSource" destination="oM9-mi-wRc" id="ubt-jB-z6P"/>
<outlet property="delegate" destination="oM9-mi-wRc" id="Mal-XI-CBW"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Appearance" id="Ygz-zL-xT0"/>
<connections>
<outlet property="circularAvatarsSwitch" destination="Huh-Lk-M4J" id="D0Q-1G-ZaY"/>
<outlet property="hideCustomEmojiInUsernamesSwitch" destination="XJI-I2-vRF" id="yOV-Zc-uPV"/>
<outlet property="showRepliesInProfilesSwitch" destination="1r3-n8-8xm" id="dfM-E0-fYY"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Rkj-gt-dSt" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2" y="535"/>
</scene>
<!--Behavior-->
<scene sceneID="Ebo-tR-MEU">
<objects>
<tableViewController id="Nk9-yO-78a" customClass="BehaviorTableViewController" customModule="Tusker" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="insetGrouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="mh1-En-1nK">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<sections>
<tableViewSection id="aBH-nA-3uG">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="d0B-9U-ZkB">
<rect key="frame" x="16" y="18" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="d0B-9U-ZkB" id="GI8-Xu-bhJ">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Default Post Visibility" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xrH-fX-mdk">
<rect key="frame" x="16" y="11.5" width="162" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Public" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OBq-tA-USG">
<rect key="frame" x="280" y="11.5" width="47" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="secondaryLabelColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstAttribute="trailingMargin" secondItem="OBq-tA-USG" secondAttribute="trailing" constant="8" id="PEX-ks-Ntx"/>
<constraint firstItem="xrH-fX-mdk" firstAttribute="centerY" secondItem="GI8-Xu-bhJ" secondAttribute="centerY" id="SlK-Id-U1r"/>
<constraint firstItem="OBq-tA-USG" firstAttribute="centerY" secondItem="GI8-Xu-bhJ" secondAttribute="centerY" id="VT7-GB-9U4"/>
<constraint firstItem="xrH-fX-mdk" firstAttribute="leading" secondItem="GI8-Xu-bhJ" secondAttribute="leadingMargin" constant="8" id="vwm-LF-b6v"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="T41-nS-8UI">
<rect key="frame" x="16" y="62" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="T41-nS-8UI" id="bCk-ll-mpm">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Automatically Save Drafts" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2y8-UR-gqh">
<rect key="frame" x="16" y="11.5" width="196" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="HV4-3m-Mal">
<rect key="frame" x="278" y="6.5" width="51" height="31"/>
<connections>
<action selector="automaticallySaveDraftsChanged:" destination="Nk9-yO-78a" eventType="valueChanged" id="oHc-vf-afw"/>
</connections>
</switch>
</subviews>
<constraints>
<constraint firstItem="2y8-UR-gqh" firstAttribute="leading" secondItem="bCk-ll-mpm" secondAttribute="leadingMargin" constant="8" id="MWr-9X-TKF"/>
<constraint firstItem="HV4-3m-Mal" firstAttribute="centerY" secondItem="bCk-ll-mpm" secondAttribute="centerY" id="Ogg-Sb-CpW"/>
<constraint firstAttribute="trailingMargin" secondItem="HV4-3m-Mal" secondAttribute="trailing" constant="8" id="h5L-QT-jeb"/>
<constraint firstItem="2y8-UR-gqh" firstAttribute="centerY" secondItem="bCk-ll-mpm" secondAttribute="centerY" id="pZ7-S0-xAN"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection id="pnH-qu-zTX">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="A95-CC-eMR">
<rect key="frame" x="16" y="142" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="A95-CC-eMR" id="0l5-fe-g8R">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Open Links in Apps" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pRl-1e-i4j">
<rect key="frame" x="16" y="11.5" width="148" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="85C-G0-cRk">
<rect key="frame" x="278" y="6.5" width="51" height="31"/>
<connections>
<action selector="automaticallySaveDraftsChanged:" destination="Nk9-yO-78a" eventType="valueChanged" id="3jl-gq-XEX"/>
<action selector="openLinksInAppsChanged:" destination="Nk9-yO-78a" eventType="valueChanged" id="THd-FD-XYN"/>
</connections>
</switch>
</subviews>
<constraints>
<constraint firstItem="85C-G0-cRk" firstAttribute="centerY" secondItem="0l5-fe-g8R" secondAttribute="centerY" id="QuM-P5-nPV"/>
<constraint firstItem="pRl-1e-i4j" firstAttribute="leading" secondItem="0l5-fe-g8R" secondAttribute="leadingMargin" constant="8" id="Xqp-IO-EiQ"/>
<constraint firstAttribute="trailingMargin" secondItem="85C-G0-cRk" secondAttribute="trailing" constant="8" id="bKz-K4-r5w"/>
<constraint firstItem="pRl-1e-i4j" firstAttribute="centerY" secondItem="0l5-fe-g8R" secondAttribute="centerY" id="ns6-xZ-q0A"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
<connections>
<outlet property="dataSource" destination="Nk9-yO-78a" id="bN3-mz-nCZ"/>
<outlet property="delegate" destination="Nk9-yO-78a" id="06Z-ze-T6Q"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Behavior" id="PaI-hR-64i"/>
<connections>
<outlet property="automaticallySaveDraftsSwitch" destination="HV4-3m-Mal" id="eE1-Q4-za9"/>
<outlet property="defaultPostVisibilityLabel" destination="OBq-tA-USG" id="yFX-yQ-dN9"/>
<outlet property="openLinksInAppsSwitch" destination="85C-G0-cRk" id="2lR-Jb-O6K"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="YN6-Jb-XJJ" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="825" y="528"/>
</scene>
<!--Advanced-->
<scene sceneID="xgj-Fx-53j">
<objects>
<tableViewController id="3mv-l7-6We" customClass="AdvancedTableViewController" customModule="Tusker" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="insetGrouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="hcR-ju-th0">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<sections>
<tableViewSection headerTitle="Automation" id="eWp-x3-oMd">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" id="O0c-tR-bX1">
<rect key="frame" x="16" y="55.5" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="O0c-tR-bX1" id="im1-BJ-7Ov">
<rect key="frame" x="0.0" y="0.0" width="316.5" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Silent Action Permissions" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dxZ-65-xsN">
<rect key="frame" x="16" y="11.5" width="193" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="dxZ-65-xsN" firstAttribute="centerY" secondItem="im1-BJ-7Ov" secondAttribute="centerY" id="8kb-23-tWR"/>
<constraint firstItem="dxZ-65-xsN" firstAttribute="leading" secondItem="im1-BJ-7Ov" secondAttribute="leadingMargin" constant="8" id="cx9-eY-n5y"/>
</constraints>
</tableViewCellContentView>
<connections>
<segue destination="aHP-YB-bnY" kind="show" id="YTT-Nh-TBJ"/>
</connections>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection id="aNt-ow-hHp">
<string key="footerTitle">This option is only supported for Pleroma instances with formatting enabled. On all other instances, formatting symbols will remain in the plain, unformatted text.</string>
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="L56-bm-5R5">
<rect key="frame" x="16" y="135.5" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="L56-bm-5R5" id="mtr-Qa-CSI">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Post Content Type" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ThO-WW-QsH">
<rect key="frame" x="16" y="11.5" width="142" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Plain" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uq5-Fi-mpp">
<rect key="frame" x="290" y="11.5" width="37" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="secondaryLabelColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="uq5-Fi-mpp" firstAttribute="centerY" secondItem="mtr-Qa-CSI" secondAttribute="centerY" id="BMn-9K-DXz"/>
<constraint firstItem="ThO-WW-QsH" firstAttribute="centerY" secondItem="mtr-Qa-CSI" secondAttribute="centerY" id="p7P-du-z4q"/>
<constraint firstItem="ThO-WW-QsH" firstAttribute="leading" secondItem="mtr-Qa-CSI" secondAttribute="leadingMargin" constant="8" id="upT-aD-0JW"/>
<constraint firstItem="uq5-Fi-mpp" firstAttribute="trailing" secondItem="mtr-Qa-CSI" secondAttribute="trailingMargin" constant="-8" id="vW4-hc-eeu"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
<connections>
<outlet property="dataSource" destination="3mv-l7-6We" id="Ots-vG-253"/>
<outlet property="delegate" destination="3mv-l7-6We" id="sgz-7z-l0C"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Advanced" id="Rav-Eq-k22"/>
<connections>
<outlet property="postContentTypeLabel" destination="uq5-Fi-mpp" id="LN1-20-FMA"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4wC-Hp-AZk" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1612" y="528"/>
</scene>
<!--Silent Actions-->
<scene sceneID="Vyy-sh-Tca">
<objects>
<tableViewController id="aHP-YB-bnY" customClass="SilentActionPermissionsTableViewController" customModule="Tusker" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="Bpx-p9-yXW">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<connections>
<outlet property="dataSource" destination="aHP-YB-bnY" id="f9C-VF-QBf"/>
<outlet property="delegate" destination="aHP-YB-bnY" id="8P5-YV-yop"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Silent Actions" id="W0R-yx-QyV"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Db4-9Z-l6U" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1612" y="1280"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="3UV-H1-kd4">
<objects>
<navigationController id="VJJ-jC-9g8" sceneMemberID="viewController">
<nil key="simulatedBottomBarMetrics"/>
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="YW6-8Y-aXt">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="ArB-e7-yko" kind="relationship" relationship="rootViewController" id="iO7-5u-D0i"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Otz-oe-r9y" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="825" y="-1025"/>
</scene>
</scenes>
</document>

View File

@ -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)
}
}

View File

@ -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.
}
*/
}