Commit bda1cc54 authored by Oliver Wiese's avatar Oliver Wiese

clean code

parent 8bd4b344
......@@ -76,6 +76,7 @@ class ReadViewCoordinator {
//TODO: make this work
Logger.log(delete: mail, toTrash: true)
AppDelegate.getAppDelegate().mailHandler.move(mails: [mail], from: mail.folder.path, to: UserManager.backendTrashFolderPath)
AppDelegate.getAppDelegate().presentInboxViewController()
}
func archive(mail: PersistentMail){
......@@ -98,13 +99,6 @@ class ReadViewCoordinator {
root.pushViewController(vc, animated: true)
}
func pushExportKeyView() {
//TODO: make this work
let vc = mainStoryboard.instantiateViewController(identifier: "exportKeyFromReadView")
root.isToolbarHidden = false
root.pushViewController(vc, animated: true)
}
func pushContactView(contact: KeyRecord) {
let vc = mainStoryboard.instantiateViewController(withIdentifier: ViewID.KeyRecordView.rawValue)
if let vc = vc as? ContactViewController {
......@@ -119,37 +113,6 @@ class ReadViewCoordinator {
root.present(vc, animated: true)
}
func setup(){
hideUIKitToolbar()
setupNavigationbar()
}
func reset(){
animateBarColor(ThemeManager.defaultColor)
}
func hideUIKitToolbar(){
root.isToolbarHidden = true
}
func setupNavigationbar(){
///those dont work
//root.isNavigationBarHidden=true
//root.navigationBar.isHidden=true
//root.navigationBar.isTranslucent=true
/*if mail.trouble{animateBarColor(ThemeManager.troubleMessageColor()) }
else{animateBarColor(mail.isSecure ? ThemeManager.encryptedMessageColor() : ThemeManager.unencryptedMessageColor())}*/
}
private func animateBarColor(_ c:UIColor){
//TODO: why desnt it work? it just jumps
UIView.animate(withDuration: 0.3, animations: {
self.root.navigationBar.barTintColor = c })
}
/// AskUserToImportSK, ImportSK, ImportPK, MoreInformation, ExportSK, OK, IgnoreWarning, SendPK
func ignoreMail <M: DisplayMail> (mail: M) {
guard let m = mail.persistentMail else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment