Archived
Fixed some issues, revamped code and added a little YouTube easter egg
This commit is contained in:
@@ -97,7 +97,7 @@
|
|||||||
A96D4CC722DDE01A006BAB34 /* GeneralPlanViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeneralPlanViewController.swift; sourceTree = "<group>"; };
|
A96D4CC722DDE01A006BAB34 /* GeneralPlanViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeneralPlanViewController.swift; sourceTree = "<group>"; };
|
||||||
A96D4CC922DDE184006BAB34 /* PersonalPlanViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonalPlanViewController.swift; sourceTree = "<group>"; };
|
A96D4CC922DDE184006BAB34 /* PersonalPlanViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonalPlanViewController.swift; sourceTree = "<group>"; };
|
||||||
A9769079233F2E680015AF1A /* CoursePickerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoursePickerViewController.swift; sourceTree = "<group>"; };
|
A9769079233F2E680015AF1A /* CoursePickerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoursePickerViewController.swift; sourceTree = "<group>"; };
|
||||||
A996BFF322E05AAB00E7BE42 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Base; path = Base.lproj/Info.plist; sourceTree = "<group>"; };
|
A996BFF322E05AAB00E7BE42 /* Base */ = {isa = PBXFileReference; explicitFileType = text.html; name = Base; path = Base.lproj/Info.plist; sourceTree = "<group>"; };
|
||||||
A996BFFC22E05AAB00E7BE42 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
A996BFFC22E05AAB00E7BE42 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
A996BFFD22E05AAB00E7BE42 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
A996BFFD22E05AAB00E7BE42 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
A99AB5F7230155DE00555295 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
|
A99AB5F7230155DE00555295 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
|
||||||
|
|||||||
@@ -53,5 +53,9 @@
|
|||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
</array>
|
</array>
|
||||||
|
<key>LSApplicationQueriesSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>youtube</string>
|
||||||
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -23,10 +23,10 @@
|
|||||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
<viewLayoutGuide key="safeArea" id="h2U-4g-7Ak"/>
|
<viewLayoutGuide key="safeArea" id="h2U-4g-7Ak"/>
|
||||||
<items>
|
<items>
|
||||||
<tabBarItem title="" image="ic_writing" selectedImage="ic_writing" id="keQ-St-8hM"/>
|
<tabBarItem title=" " image="ic_writing" selectedImage="ic_writing" id="keQ-St-8hM"/>
|
||||||
<tabBarItem title="" image="ic_idea" selectedImage="ic_idea" id="spn-vi-J6I"/>
|
<tabBarItem title=" " image="ic_idea" selectedImage="ic_idea" id="spn-vi-J6I"/>
|
||||||
<tabBarItem title="" image="ic_information" selectedImage="ic_information" id="OBW-rE-k7z"/>
|
<tabBarItem title=" " image="ic_information" selectedImage="ic_information" id="OBW-rE-k7z"/>
|
||||||
<tabBarItem title="" image="ic_tomato" selectedImage="ic_tomato" id="zev-fl-fMd"/>
|
<tabBarItem title=" " image="ic_tomato" selectedImage="ic_tomato" id="zev-fl-fMd"/>
|
||||||
</items>
|
</items>
|
||||||
</tabBar>
|
</tabBar>
|
||||||
</subviews>
|
</subviews>
|
||||||
|
|||||||
@@ -74,9 +74,11 @@
|
|||||||
<subviews>
|
<subviews>
|
||||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jng-S6-ZuJ">
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jng-S6-ZuJ">
|
||||||
<rect key="frame" x="16" y="8.0000000000000018" width="382" height="27.666666666666671"/>
|
<rect key="frame" x="16" y="8.0000000000000018" width="382" height="27.666666666666671"/>
|
||||||
|
<gestureRecognizers/>
|
||||||
<state key="normal" title="Customize course colors"/>
|
<state key="normal" title="Customize course colors"/>
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="customizeColoursButton:" destination="5GD-rn-jaq" eventType="touchUpInside" id="35i-it-53Q"/>
|
<action selector="customizeColoursButton:" destination="5GD-rn-jaq" eventType="touchUpInside" id="35i-it-53Q"/>
|
||||||
|
<outletCollection property="gestureRecognizers" destination="M8p-Lq-ly5" appends="YES" id="wsn-xc-r0D"/>
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
</subviews>
|
</subviews>
|
||||||
@@ -138,8 +140,10 @@
|
|||||||
</textField>
|
</textField>
|
||||||
<button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" horizontalCompressionResistancePriority="751" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="detailDisclosure" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9Jr-BA-G9n">
|
<button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" horizontalCompressionResistancePriority="751" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="detailDisclosure" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9Jr-BA-G9n">
|
||||||
<rect key="frame" x="368" y="8.0000000000000018" width="22" height="27.666666666666671"/>
|
<rect key="frame" x="368" y="8.0000000000000018" width="22" height="27.666666666666671"/>
|
||||||
|
<gestureRecognizers/>
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="courseHelpButton:" destination="5GD-rn-jaq" eventType="touchUpInside" id="s6W-7N-y6f"/>
|
<action selector="courseHelpButton:" destination="5GD-rn-jaq" eventType="touchUpInside" id="s6W-7N-y6f"/>
|
||||||
|
<outletCollection property="gestureRecognizers" destination="z35-to-GHz" appends="YES" id="hRI-cP-ZTs"/>
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
</subviews>
|
</subviews>
|
||||||
@@ -265,6 +269,7 @@
|
|||||||
</navigationItem>
|
</navigationItem>
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="autoRefreshToggle" destination="MmI-fr-TwC" id="OQW-Z7-t1S"/>
|
<outlet property="autoRefreshToggle" destination="MmI-fr-TwC" id="OQW-Z7-t1S"/>
|
||||||
|
<outlet property="customizeCourseColorsButton" destination="jng-S6-ZuJ" id="plZ-dg-MS6"/>
|
||||||
<outlet property="defaultSwitch" destination="Evc-f7-YMZ" id="lTz-cN-Cud"/>
|
<outlet property="defaultSwitch" destination="Evc-f7-YMZ" id="lTz-cN-Cud"/>
|
||||||
<outlet property="orderingSegments" destination="1Nm-Wb-8js" id="XhR-GP-Y26"/>
|
<outlet property="orderingSegments" destination="1Nm-Wb-8js" id="XhR-GP-Y26"/>
|
||||||
<outlet property="textToolbar" destination="8oS-yh-q36" id="s0y-mh-0Bi"/>
|
<outlet property="textToolbar" destination="8oS-yh-q36" id="s0y-mh-0Bi"/>
|
||||||
@@ -286,6 +291,16 @@
|
|||||||
</barButtonItem>
|
</barButtonItem>
|
||||||
</items>
|
</items>
|
||||||
</toolbar>
|
</toolbar>
|
||||||
|
<pongPressGestureRecognizer allowableMovement="10" minimumPressDuration="0.5" id="M8p-Lq-ly5">
|
||||||
|
<connections>
|
||||||
|
<action selector="longPressListener:" destination="5GD-rn-jaq" id="ybZ-vp-4Rd"/>
|
||||||
|
</connections>
|
||||||
|
</pongPressGestureRecognizer>
|
||||||
|
<pongPressGestureRecognizer allowableMovement="10" minimumPressDuration="0.5" id="z35-to-GHz">
|
||||||
|
<connections>
|
||||||
|
<action selector="infoLongPressListener:" destination="5GD-rn-jaq" id="kR0-b7-jg0"/>
|
||||||
|
</connections>
|
||||||
|
</pongPressGestureRecognizer>
|
||||||
</objects>
|
</objects>
|
||||||
<point key="canvasLocation" x="3471" y="-1221"/>
|
<point key="canvasLocation" x="3471" y="-1221"/>
|
||||||
</scene>
|
</scene>
|
||||||
@@ -338,7 +353,7 @@
|
|||||||
<navigationBar contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pyq-c3-PYx">
|
<navigationBar contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pyq-c3-PYx">
|
||||||
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
|
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
|
||||||
<items>
|
<items>
|
||||||
<navigationItem title="Customize colours" id="bj2-hB-vVb">
|
<navigationItem title="Course colors" id="bj2-hB-vVb">
|
||||||
<barButtonItem key="rightBarButtonItem" title="Done" id="g4a-cE-7bJ">
|
<barButtonItem key="rightBarButtonItem" title="Done" id="g4a-cE-7bJ">
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="saveButton:" destination="whN-0o-req" id="Z83-bM-1yv"/>
|
<action selector="saveButton:" destination="whN-0o-req" id="Z83-bM-1yv"/>
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ class ColourPickerView: UIViewController, UICollectionViewDataSource, UICollecti
|
|||||||
var index = 0
|
var index = 0
|
||||||
var key = ""
|
var key = ""
|
||||||
@IBOutlet weak var collectionView: UICollectionView!
|
@IBOutlet weak var collectionView: UICollectionView!
|
||||||
var previousSelected: IndexPath? = nil
|
|
||||||
var currentSelected: IndexPath? = nil
|
var currentSelected: IndexPath? = nil
|
||||||
var selectedNewItem = false
|
var selectedNewItem = false
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ class CustomizationViewController: UITableViewController, UITextFieldDelegate {
|
|||||||
|
|
||||||
let prefs = UserDefaults.standard
|
let prefs = UserDefaults.standard
|
||||||
let df = DataFetcher.sharedInstance
|
let df = DataFetcher.sharedInstance
|
||||||
|
var buttonTextChanged = false
|
||||||
|
|
||||||
@IBOutlet weak var txtName: UITextField!
|
@IBOutlet weak var txtName: UITextField!
|
||||||
@IBOutlet weak var txtClasses: UITextField!
|
@IBOutlet weak var txtClasses: UITextField!
|
||||||
@@ -20,6 +21,7 @@ class CustomizationViewController: UITableViewController, UITextFieldDelegate {
|
|||||||
@IBOutlet weak var textToolbar: UIToolbar!
|
@IBOutlet weak var textToolbar: UIToolbar!
|
||||||
@IBOutlet weak var orderingSegments: UISegmentedControl!
|
@IBOutlet weak var orderingSegments: UISegmentedControl!
|
||||||
@IBOutlet weak var autoRefreshToggle: UISwitch!
|
@IBOutlet weak var autoRefreshToggle: UISwitch!
|
||||||
|
@IBOutlet weak var customizeCourseColorsButton: UIButton!
|
||||||
|
|
||||||
@IBAction func textDismissButton(_ sender: UIBarButtonItem) {
|
@IBAction func textDismissButton(_ sender: UIBarButtonItem) {
|
||||||
view.endEditing(true)
|
view.endEditing(true)
|
||||||
@@ -42,17 +44,11 @@ class CustomizationViewController: UITableViewController, UITextFieldDelegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@IBAction func done(_ sender: UIBarButtonItem) {
|
@IBAction func done(_ sender: UIBarButtonItem) {
|
||||||
|
|
||||||
self.prefs.set(self.txtName.text, forKey: "username")
|
self.prefs.set(self.txtName.text, forKey: "username")
|
||||||
self.prefs.set(self.txtClasses.text, forKey: "classes")
|
self.prefs.set(self.txtClasses.text, forKey: "classes")
|
||||||
self.prefs.set(self.txtCourses.text, forKey: "courses")
|
self.prefs.set(self.txtCourses.text, forKey: "courses")
|
||||||
|
|
||||||
var defaultPlan: Int
|
let defaultPlan = self.defaultSwitch.isOn ? 1 : 0
|
||||||
if self.defaultSwitch.isOn {
|
|
||||||
defaultPlan = 1
|
|
||||||
} else {
|
|
||||||
defaultPlan = 0
|
|
||||||
}
|
|
||||||
self.prefs.set(defaultPlan, forKey: "default-plan")
|
self.prefs.set(defaultPlan, forKey: "default-plan")
|
||||||
self.prefs.set(self.orderingSegments.selectedSegmentIndex == 1, forKey: "original_sorting")
|
self.prefs.set(self.orderingSegments.selectedSegmentIndex == 1, forKey: "original_sorting")
|
||||||
self.prefs.set(self.autoRefreshToggle.isOn, forKey: "auto_refresh")
|
self.prefs.set(self.autoRefreshToggle.isOn, forKey: "auto_refresh")
|
||||||
@@ -66,6 +62,34 @@ class CustomizationViewController: UITableViewController, UITextFieldDelegate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@IBAction func longPressListener(_ sender: UILongPressGestureRecognizer) {
|
||||||
|
sender.minimumPressDuration = 2
|
||||||
|
if sender.state == .ended {
|
||||||
|
if !buttonTextChanged {
|
||||||
|
self.customizeCourseColorsButton.setTitle(NSLocalizedString("made_by_deniz", comment: ""), for: .normal)
|
||||||
|
buttonTextChanged = true
|
||||||
|
} else {
|
||||||
|
self.customizeCourseColorsButton.setTitle(NSLocalizedString("customize_course_colors", comment: ""), for: .normal)
|
||||||
|
buttonTextChanged = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@IBAction func infoLongPressListener(_ sender: UILongPressGestureRecognizer) {
|
||||||
|
sender.minimumPressDuration = 2
|
||||||
|
if sender.state == .ended {
|
||||||
|
let youtubeId = "Jc2xfYuLWgE"
|
||||||
|
if let youtubeURL = URL(string: "youtube://\(youtubeId)"),
|
||||||
|
UIApplication.shared.canOpenURL(youtubeURL) {
|
||||||
|
// redirect to app
|
||||||
|
UIApplication.shared.open(youtubeURL, options: [:], completionHandler: nil)
|
||||||
|
} else if let youtubeURL = URL(string: "https://www.youtube.com/watch?v=\(youtubeId)") {
|
||||||
|
// redirect through safari
|
||||||
|
UIApplication.shared.open(youtubeURL, options: [:], completionHandler: nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
||||||
@@ -76,17 +100,8 @@ class CustomizationViewController: UITableViewController, UITextFieldDelegate {
|
|||||||
self.txtName.text = prefs.string(forKey: "username")
|
self.txtName.text = prefs.string(forKey: "username")
|
||||||
self.txtClasses.text = prefs.string(forKey: "classes")
|
self.txtClasses.text = prefs.string(forKey: "classes")
|
||||||
self.txtCourses.text = prefs.string(forKey: "courses")
|
self.txtCourses.text = prefs.string(forKey: "courses")
|
||||||
if self.prefs.integer(forKey: "default-plan") == 1 {
|
self.defaultSwitch.isOn = self.prefs.integer(forKey: "default-plan") == 1 ? true : false
|
||||||
self.defaultSwitch.isOn = true
|
let order = self.prefs.bool(forKey: "original_sorting") ? 1 : 0
|
||||||
} else {
|
|
||||||
self.defaultSwitch.isOn = false
|
|
||||||
}
|
|
||||||
var order: Int
|
|
||||||
if self.prefs.bool(forKey: "original_sorting") {
|
|
||||||
order = 1
|
|
||||||
} else {
|
|
||||||
order = 0
|
|
||||||
}
|
|
||||||
self.orderingSegments.selectedSegmentIndex = order
|
self.orderingSegments.selectedSegmentIndex = order
|
||||||
self.autoRefreshToggle.isOn = self.prefs.bool(forKey: "auto_refresh")
|
self.autoRefreshToggle.isOn = self.prefs.bool(forKey: "auto_refresh")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ class DataFetcher {
|
|||||||
let a = String(group[...group.startIndex])
|
let a = String(group[...group.startIndex])
|
||||||
if group.count > 1, let b = Int(String(group[group.index(group.startIndex, offsetBy: 0)...group.index(group.startIndex, offsetBy: 1)])) {
|
if group.count > 1, let b = Int(String(group[group.index(group.startIndex, offsetBy: 0)...group.index(group.startIndex, offsetBy: 1)])) {
|
||||||
return -b
|
return -b
|
||||||
} else if self.checkStringForArray(s: a, checking: juniors) == true {
|
} else if self.checkStringForArray(s: a, checking: juniors, lowercase: false) == true {
|
||||||
return -101
|
return -101
|
||||||
} else {
|
} else {
|
||||||
return -100
|
return -100
|
||||||
@@ -154,6 +154,8 @@ class DataFetcher {
|
|||||||
|
|
||||||
if isPSA {
|
if isPSA {
|
||||||
return -1
|
return -1
|
||||||
|
} else if d.isEmpty {
|
||||||
|
return 13
|
||||||
}
|
}
|
||||||
|
|
||||||
let periodIndex = d.firstIndex(of: ".")
|
let periodIndex = d.firstIndex(of: ".")
|
||||||
@@ -244,9 +246,9 @@ class DataFetcher {
|
|||||||
let foodItems = try foodDocument.select("th")
|
let foodItems = try foodDocument.select("th")
|
||||||
|
|
||||||
var indices = [Int]()
|
var indices = [Int]()
|
||||||
let daysAndVon = ["Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "von"]
|
let daysAndVon = ["montag", "dienstag", "mittwoch", "donnerstag", "freitag", "von", "wünschen"]
|
||||||
for i in 0..<foodItems.size() {
|
for i in 0..<foodItems.size() {
|
||||||
if checkStringForArray(s: try foodItems.get(i).text(), checking: daysAndVon) {
|
if checkStringForArray(s: try foodItems.get(i).text(), checking: daysAndVon, lowercase: true) {
|
||||||
indices.append(i)
|
indices.append(i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -279,9 +281,10 @@ class DataFetcher {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func checkStringForArray(s: String, checking: [String]) -> Bool {
|
private func checkStringForArray(s: String, checking: [String], lowercase: Bool) -> Bool {
|
||||||
|
let str = lowercase ? s.lowercased() : s
|
||||||
for i in checking.indices {
|
for i in checking.indices {
|
||||||
if s.contains(checking[i]) {
|
if str.contains(checking[i]) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class MenuViewController : UICollectionViewController, UICollectionViewDelegateM
|
|||||||
df.doAsync(do: "menu") { menuItems in
|
df.doAsync(do: "menu") { menuItems in
|
||||||
self.items = menuItems as! [String]
|
self.items = menuItems as! [String]
|
||||||
|
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
|
UIView.performWithoutAnimation {
|
||||||
self.collectionView.reloadData()
|
self.collectionView.reloadData()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,11 +76,12 @@ class PlanViewController : UICollectionViewController, UICollectionViewDelegateM
|
|||||||
self.substs = self.getFromDatabase()
|
self.substs = self.getFromDatabase()
|
||||||
self.collectionView.reloadData()
|
self.collectionView.reloadData()
|
||||||
|
|
||||||
if self.df.shouldRefresh {
|
if self.df.shouldRefresh || (self.prefs.bool(forKey: "setup_finished") && !self.prefs.bool(forKey: "first_refresh")) {
|
||||||
self.collectionView.setContentOffset(CGPoint(x: 0, y: -self.refreshControl.frame.size.height), animated: true)
|
self.collectionView.setContentOffset(CGPoint(x: 0, y: -self.refreshControl.frame.size.height), animated: true)
|
||||||
self.refreshControl.beginRefreshing()
|
self.refreshControl.beginRefreshing()
|
||||||
self.refreshControl.sendActions(for: .valueChanged)
|
self.refreshControl.sendActions(for: .valueChanged)
|
||||||
self.df.shouldRefresh = false
|
self.df.shouldRefresh = false
|
||||||
|
self.prefs.set(true, forKey: "first_refresh")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,7 +112,9 @@ class PlanViewController : UICollectionViewController, UICollectionViewDelegateM
|
|||||||
@objc private func objDoAsync(_ sender: Any) {
|
@objc private func objDoAsync(_ sender: Any) {
|
||||||
self.df.doAsync(do: self.getViewType()) { substitutions in
|
self.df.doAsync(do: self.getViewType()) { substitutions in
|
||||||
self.substs = substitutions as! [SubstModel]
|
self.substs = substitutions as! [SubstModel]
|
||||||
self.collectionView.reloadData()
|
UIView.performWithoutAnimation {
|
||||||
|
self.collectionView.reloadData()
|
||||||
|
}
|
||||||
self.refreshControl.endRefreshing()
|
self.refreshControl.endRefreshing()
|
||||||
self.df.setTabBarBadge(for: self.tabBarController?.tabBar.items)
|
self.df.setTabBarBadge(for: self.tabBarController?.tabBar.items)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,6 +80,8 @@
|
|||||||
"enter_grade_title" = "Wie du deine Klasse eintragen kannst";
|
"enter_grade_title" = "Wie du deine Klasse eintragen kannst";
|
||||||
"enter_course_title" = "Wie du deine Kurse eintragen kannst";
|
"enter_course_title" = "Wie du deine Kurse eintragen kannst";
|
||||||
"enter_order_title" = "Informationen über Sortierweisen";
|
"enter_order_title" = "Informationen über Sortierweisen";
|
||||||
"enter_grade_help" = "Trage deine derzeitige Klasse ein, damit sie in deinem persönlichen Plan auftaucht.\n\nAnmerkung:\n\nIn der Mittelstufe müssen Nummer und Buchstabe zusammen geschrieben werden, Beispiel: \"5a\".\n\nIn der E-Phase müssen diese durch ein Leerzeichen getrennt werden, Beispiel: \"18 a\".\n\nIn der Q1/Q2 sollen nur die Nummern eingetragen werden, Beispiel: \"17\".\n\nMehrere Klassen können nur eingetragen werden, wenn keine Kurse eingetragen sind.";
|
"enter_grade_help" = "Trage deine derzeitige Klasse ein, damit sie in deinem persönlichen Plan auftaucht.\n\nAnmerkung:\n\nIn der Mittelstufe müssen Nummer und Buchstabe zusammen geschrieben werden, Beispiel: \"5a\".\n\nIn der E-Phase müssen diese durch ein Leerzeichen getrennt werden, Beispiel: \"18 a\".\n\nIn der Q1/Q2 sollen nur die Nummern eingetragen werden, Beispiel: \"17\".\n\nMehrere Klassen einzutragen ist nicht empfohlen.";
|
||||||
"enter_course_help" = "Trag die Kürzel für die Kurse ein, welche in deinem persönlichen Plan auftauchen sollen. Du kannst diese auf deinem Stundenplan finden.\n\nHier sind einige Beispiele:\n\nMathe in der 5. Klasse (Mittelstufe) wäre MAT.\n\nDer Englisch-Profilkurs in der E-Phase könnte ENP1 sein.\n\nDer Bio-Grundkurs in der Q1 ist z.B. bio1.\n\nMeist müssen Kurse für Mittelstufenschüler nicht eingetragen werden.\nTrenne mehrere Kurse mit Leerzeichen, Kommas sind optional.\nGroß- und Kleinschreibung wird beachtet.";
|
"enter_course_help" = "Trag die Kürzel für die Kurse ein, welche in deinem persönlichen Plan auftauchen sollen. Du kannst diese auf deinem Stundenplan finden.\n\nHier sind einige Beispiele:\n\nMathe in der 5. Klasse (Mittelstufe) wäre MAT.\n\nDer Englisch-Profilkurs in der E-Phase könnte ENP1 sein.\n\nDer Bio-Grundkurs in der Q1 ist z.B. bio1.\n\nMeist müssen Kurse für Mittelstufenschüler nicht eingetragen werden.\nTrenne mehrere Kurse mit Leerzeichen, Kommas sind optional.\nGroß- und Kleinschreibung wird beachtet.";
|
||||||
"enter_order_help" = "Du kannst zwischen zwei Sortierweisen auswählen, welche die Reihenfolge der Einträge auf dem Vertretungsplan bestimmen.\n\nStandardmäßig ist \'App-Sortierung\' ausgewählt; dies bietet einen konsistenten Plan sortiert nach Klassen, dann nach Stunden.\n\n\'Website-Sortierung\' bietet die Original-Reihenfolge der Website. Diese ist jedoch nicht konsistent, weswegen \'App-Sortierung\' standardmäßig ausgewählt ist.";
|
"enter_order_help" = "Du kannst zwischen zwei Sortierweisen auswählen, welche die Reihenfolge der Einträge auf dem Vertretungsplan bestimmen.\n\nStandardmäßig ist \'App-Sortierung\' ausgewählt; dies bietet einen konsistenten Plan sortiert nach Klassen, dann nach Stunden.\n\n\'Website-Sortierung\' bietet die Original-Reihenfolge der Website. Diese ist jedoch nicht konsistent, weswegen \'App-Sortierung\' standardmäßig ausgewählt ist.";
|
||||||
|
"made_by_deniz" = "Entwickelt von Deniz :)";
|
||||||
|
"customize_course_colors" = "Kursfarben einstellen";
|
||||||
|
|||||||
@@ -130,9 +130,9 @@
|
|||||||
|
|
||||||
"oiQ-2o-sH8.text" = "Bei App-Start aktualisieren";
|
"oiQ-2o-sH8.text" = "Bei App-Start aktualisieren";
|
||||||
|
|
||||||
"jng-S6-ZuJ.normalTitle" = "Stelle Kursfarben ein";
|
"jng-S6-ZuJ.normalTitle" = "Kursfarben einstellen";
|
||||||
|
|
||||||
"bj2-hB-vVb.title" = "Benutzerdefinierte Farben";
|
"bj2-hB-vVb.title" = "Kursfarben";
|
||||||
|
|
||||||
"FhN-ih-qVW.title" = "Speichern";
|
"FhN-ih-qVW.title" = "Speichern";
|
||||||
|
|
||||||
|
|||||||
@@ -81,6 +81,8 @@
|
|||||||
"enter_grade_title" = "How to enter your grade";
|
"enter_grade_title" = "How to enter your grade";
|
||||||
"enter_course_title" = "How to enter your courses";
|
"enter_course_title" = "How to enter your courses";
|
||||||
"enter_order_title" = "Information on ordering systems";
|
"enter_order_title" = "Information on ordering systems";
|
||||||
"enter_grade_help" = "Enter your current grade to have it appear in your personal plan.\n\nNote:\n\nIn junior phase, put the number and letter together, as in \"5a\".\n\nIn E-Phase, separate them by a space, as in \"18 a\".\n\nIn Q1/Q2, only put in the number, as in \"17\".\n\nMultiple grades can only be entered when no courses have been entered.";
|
"enter_grade_help" = "Enter your current grade to have it appear in your personal plan.\n\nNote:\n\nIn junior phase, put the number and letter together, as in \"5a\".\n\nIn E-Phase, separate them by a space, as in \"18 a\".\n\nIn Q1/Q2, only put in the number, as in \"17\".\n\nEntering multiple grades is not recommended.";
|
||||||
"enter_course_help" = "You need to enter the course abbreviation for every course you want in your personal plan. You can find them on your time table.\n\nHere\'s a few examples:\n\nMathematics in 5th grade (juniors) would be MAT.\n\nAdvanced English in E-Phase (seniors) for the English profile may be ENP1.\n\nBasic Biology in Q1 could be bio1.\n\nIn most cases, entering courses while in junior phase is redundant.\nSeparate multiple courses by spaces, commas are optional.\nCapitalisation is required.";
|
"enter_course_help" = "You need to enter the course abbreviation for every course you want in your personal plan. You can find them on your time table.\n\nHere\'s a few examples:\n\nMathematics in 5th grade (juniors) would be MAT.\n\nAdvanced English in E-Phase (seniors) for the English profile may be ENP1.\n\nBasic Biology in Q1 could be bio1.\n\nIn most cases, entering courses while in junior phase is redundant.\nSeparate multiple courses by spaces, commas are optional.\nCapitalisation is required.";
|
||||||
"enter_order_help" = "You may pick between two ordering systems that dictate the order in which the items on the substitution plan will appear in.\n\nThe default \'app order\' is an algorithm implemented in this app that provides a consistently-sorted substitution plan ordered just like the substitution plan on the website used to; sorted by classes, then by time.\n\n\'Website order\' offers the items on the substitution plan just like they\'re presented on the school website, but since these are not guaranteed to be consistent, \'app order\' is picked by default.";
|
"enter_order_help" = "You may pick between two ordering systems that dictate the order in which the items on the substitution plan will appear in.\n\nThe default \'app order\' is an algorithm implemented in this app that provides a consistently-sorted substitution plan ordered just like the substitution plan on the website used to; sorted by classes, then by time.\n\n\'Website order\' offers the items on the substitution plan just like they\'re presented on the school website, but since these are not guaranteed to be consistent, \'app order\' is picked by default.";
|
||||||
|
"made_by_deniz" = "Developed by Deniz :)";
|
||||||
|
"customize_course_colors" = "Customize course colors";
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>BNDL</string>
|
<string>BNDL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.0</string>
|
<string>1.0.0</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1</string>
|
<string>1</string>
|
||||||
<key>UILaunchStoryboardName</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
|
|||||||
Reference in New Issue
Block a user