From 9771f2338d82f1a831c6adb5d5a7731464d80889 Mon Sep 17 00:00:00 2001
From: hannes <hannes@gfzdfuz.de>
Date: Wed, 12 May 2021 19:46:13 +0200
Subject: [PATCH] categorized UI activated

TODO: there are still no mails displayed
---
 enzevalos_iphone/StudySettings.swift          |  2 ++
 enzevalos_iphone/SwiftUI/LetterboxApp.swift   | 21 ++++++++----
 enzevalos_iphone/en.lproj/Localizable.strings | 33 +++++++++++++++++++
 3 files changed, 50 insertions(+), 6 deletions(-)

diff --git a/enzevalos_iphone/StudySettings.swift b/enzevalos_iphone/StudySettings.swift
index b417f735..e335b092 100644
--- a/enzevalos_iphone/StudySettings.swift
+++ b/enzevalos_iphone/StudySettings.swift
@@ -53,6 +53,8 @@ class StudySettings {
     static var securityIndicator: SecurityIndicator = SecurityIndicator.load() as! SecurityIndicator
     static var invitationsmode: Inviation = Inviation.load() as! Inviation
     
+    static var showCategorizedInterface = true
+    
     public static var invitationEnabled: Bool {
         get {
             return false
diff --git a/enzevalos_iphone/SwiftUI/LetterboxApp.swift b/enzevalos_iphone/SwiftUI/LetterboxApp.swift
index a3fb72fe..ac2f6491 100644
--- a/enzevalos_iphone/SwiftUI/LetterboxApp.swift
+++ b/enzevalos_iphone/SwiftUI/LetterboxApp.swift
@@ -30,12 +30,21 @@ struct LetterboxApp: App {
                 case .GENERATEKEYS:
                     PermissionRequestView() // TODO Wait
                 case .LAUNCHEDBEFORE:
-                    FolderListView()
-                        .environment(\.managedObjectContext,
-                                     PersistentDataProvider
-                                        .dataProvider
-                                        .persistentContainer
-                                        .viewContext)
+                    if StudySettings.showCategorizedInterface {
+                        InboxHome(controller: HomeModel())
+                            //.navigationBarItems(leading: self.folderButton)
+                            .environment(\.managedObjectContext, PersistentDataProvider
+                                            .dataProvider
+                                            .persistentContainer
+                                            .viewContext)
+                    }else{
+                        FolderListView()
+                            .environment(\.managedObjectContext,
+                                         PersistentDataProvider
+                                            .dataProvider
+                                            .persistentContainer
+                                            .viewContext)
+                    }
                 }
             }
         }
diff --git a/enzevalos_iphone/en.lproj/Localizable.strings b/enzevalos_iphone/en.lproj/Localizable.strings
index 85817114..7f6e7346 100644
--- a/enzevalos_iphone/en.lproj/Localizable.strings
+++ b/enzevalos_iphone/en.lproj/Localizable.strings
@@ -454,3 +454,36 @@
 "ReadView.PrefilledMail.AskForResend.Body" = "Hey, \nI could not decrypt your last email because I do not have the secret key. Can you resend the email again and encrypt the email for the attachted secret key? Thank you and best regards";
 
 
+
+
+
+"Home"="Home";
+//Mark: Categories
+
+    //Category-names
+    "Category.OldInbox.name" = "Classic Inbox";
+    "Category.Files.name" = "Files";
+    "Category.Chats.name" = "Chats and People";
+    "Category.Screener.name" = "Unsorted";
+
+"Classic Inbox"="Classic Inbox";
+    //other
+    "Filename"="File name";
+
+    "Open Email"="open this mail";
+
+//Sort
+"Sort By"="Sort by: ";
+    "sort.recent"="recent";
+    "sort.static"="static";
+
+
+"open mail in standard view"="open mail";
+
+//Options
+
+"Mark as unread"="mark as unread";
+"Info"="Info";
+"Reply all"="reply all";
+"Reply"="reply";
+"Forward"="forward";
-- 
GitLab