From 996d2fb9df86bf3310a8b8208fdfb9ee93bdad8d Mon Sep 17 00:00:00 2001
From: Bruno Muniz Azevedo Filho <bruno@elixxir.io>
Date: Thu, 23 Jun 2022 09:30:06 -0300
Subject: [PATCH] Fixing comments on MR

---
 .../xcschemes/Integration.xcscheme            | 67 -------------------
 .../Resources/GoogleService-Info.plist        | 64 +++++++++---------
 Package.swift                                 |  2 +-
 Sources/App/AppDelegate.swift                 |  7 +-
 .../Controllers/CreateGroupController.swift   |  6 --
 .../ViewModels/MenuViewModel.swift            |  4 +-
 Sources/RequestsFeature/Models/Request.swift  | 12 ----
 .../xcshareddata/swiftpm/Package.resolved     |  2 +-
 8 files changed, 39 insertions(+), 125 deletions(-)
 delete mode 100644 .swiftpm/xcode/xcshareddata/xcschemes/Integration.xcscheme

diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/Integration.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/Integration.xcscheme
deleted file mode 100644
index a1d66e16..00000000
--- a/.swiftpm/xcode/xcshareddata/xcschemes/Integration.xcscheme
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "1340"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "YES"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "Integration"
-               BuildableName = "Integration"
-               BlueprintName = "Integration"
-               ReferencedContainer = "container:">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      launchStyle = "0"
-      useCustomWorkingDirectory = "NO"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES">
-   </LaunchAction>
-   <ProfileAction
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "Integration"
-            BuildableName = "Integration"
-            BlueprintName = "Integration"
-            ReferencedContainer = "container:">
-         </BuildableReference>
-      </MacroExpansion>
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>
diff --git a/App/client-ios/Resources/GoogleService-Info.plist b/App/client-ios/Resources/GoogleService-Info.plist
index 676030ed..03e09469 100644
--- a/App/client-ios/Resources/GoogleService-Info.plist
+++ b/App/client-ios/Resources/GoogleService-Info.plist
@@ -1,36 +1,36 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
-    <dict>
-        <key>CLIENT_ID</key>
-        <string>662236151640-herpu89qikpfs9m4kvbi9bs5fpdji5de.apps.googleusercontent.com</string>
-        <key>REVERSED_CLIENT_ID</key>
-        <string>com.googleusercontent.apps.662236151640-herpu89qikpfs9m4kvbi9bs5fpdji5de</string>
-        <key>ANDROID_CLIENT_ID</key>
-        <string>662236151640-2ughgo2dvc59dm4o39b45lbdungp2mct.apps.googleusercontent.com</string>
-        <key>API_KEY</key>
-        <string>AIzaSyCbI2yQ7pbuVSRvraqanjGcS9CDrjD7lNU</string>
-        <key>GCM_SENDER_ID</key>
-        <string>662236151640</string>
-        <key>PLIST_VERSION</key>
-        <string>1</string>
-        <key>BUNDLE_ID</key>
-        <string>io.xxlabs.messenger</string>
-        <key>PROJECT_ID</key>
-        <string>xx-messenger-6e03e</string>
-        <key>STORAGE_BUCKET</key>
-        <string>xx-messenger-6e03e.appspot.com</string>
-        <key>IS_ADS_ENABLED</key>
-        <false></false>
-        <key>IS_ANALYTICS_ENABLED</key>
-        <false></false>
-        <key>IS_APPINVITE_ENABLED</key>
-        <true></true>
-        <key>IS_GCM_ENABLED</key>
-        <true></true>
-        <key>IS_SIGNIN_ENABLED</key>
-        <true></true>
-        <key>GOOGLE_APP_ID</key>
-        <string>1:662236151640:ios:24badb58ab07515d8cef2d</string>
-    </dict>
+<dict>
+	<key>CLIENT_ID</key>
+	<string></string>
+	<key>REVERSED_CLIENT_ID</key>
+	<string></string>
+	<key>ANDROID_CLIENT_ID</key>
+	<string></string>
+	<key>API_KEY</key>
+	<string></string>
+	<key>GCM_SENDER_ID</key>
+	<string></string>
+	<key>PLIST_VERSION</key>
+	<string></string>
+	<key>BUNDLE_ID</key>
+	<string></string>
+	<key>PROJECT_ID</key>
+	<string></string>
+	<key>STORAGE_BUCKET</key>
+	<string></string>
+	<key>IS_ADS_ENABLED</key>
+	<false/>
+	<key>IS_ANALYTICS_ENABLED</key>
+	<false/>
+	<key>IS_APPINVITE_ENABLED</key>
+	<false/>
+	<key>IS_GCM_ENABLED</key>
+	<false/>
+	<key>IS_SIGNIN_ENABLED</key>
+	<false/>
+	<key>GOOGLE_APP_ID</key>
+	<string></string>
+</dict>
 </plist>
diff --git a/Package.swift b/Package.swift
index 90df7d8a..fc9a709e 100644
--- a/Package.swift
+++ b/Package.swift
@@ -53,7 +53,7 @@ let package = Package(
     dependencies: [
         .package(
             url: "https://git.xx.network/elixxir/client-ios-db.git",
-            revision: "452392e032d52b217a20cd0f9de3b289f12fe444"
+            revision: "eb071f08000b2b7646e45e7a5f55bdc9ad6dbcfa"
         ),
         .package(url: "https://github.com/Quick/Quick", from: "3.0.0"),
         .package(url: "https://github.com/Quick/Nimble", from: "9.0.0"),
diff --git a/Sources/App/AppDelegate.swift b/Sources/App/AppDelegate.swift
index 11ae3229..3675b450 100644
--- a/Sources/App/AppDelegate.swift
+++ b/Sources/App/AppDelegate.swift
@@ -93,10 +93,9 @@ public class AppDelegate: UIResponder, UIApplicationDelegate {
                     if !self.forceFailedPendingMessages {
                         self.forceFailedPendingMessages = true
 
-                        // TODO: We need a Message.Assignment for status
-//                        let query = Message.Query(status: [.sending])
-//                        let assignment = Message.Assignments(status: .sendingFailed)
-//                        _ = try? session.dbManager.bulkUpdateMessages(query, assignment)
+                        let query = Message.Query(status: [.sending])
+                        let assignment = Message.Assignments(status: .sendingFailed)
+                        _ = try? session.dbManager.bulkUpdateMessages(query, assignment)
                     }
 
                     return
diff --git a/Sources/ContactListFeature/Controllers/CreateGroupController.swift b/Sources/ContactListFeature/Controllers/CreateGroupController.swift
index 5d0690ff..73c9f8b1 100644
--- a/Sources/ContactListFeature/Controllers/CreateGroupController.swift
+++ b/Sources/ContactListFeature/Controllers/CreateGroupController.swift
@@ -183,9 +183,3 @@ extension CreateGroupController: UITableViewDelegate {
         }
     }
 }
-
-extension Contact: Hashable {
-    public func hash(into hasher: inout Hasher) {
-        hasher.combine(id)
-    }
-}
diff --git a/Sources/MenuFeature/ViewModels/MenuViewModel.swift b/Sources/MenuFeature/ViewModels/MenuViewModel.swift
index 3c70e6aa..f3e4bcbd 100644
--- a/Sources/MenuFeature/ViewModels/MenuViewModel.swift
+++ b/Sources/MenuFeature/ViewModels/MenuViewModel.swift
@@ -22,8 +22,8 @@ final class MenuViewModel {
         ])
 
         return Publishers.CombineLatest(
-            session.dbManager.fetchContactsPublisher(contactsQuery).catch { _ in Just([]) },
-            session.dbManager.fetchGroupsPublisher(groupQuery).catch { _ in Just([]) }
+            session.dbManager.fetchContactsPublisher(contactsQuery).assertNoFailure(),
+            session.dbManager.fetchGroupsPublisher(groupQuery).assertNoFailure()
         )
         .map { $0.0.count + $0.1.count }
         .eraseToAnyPublisher()
diff --git a/Sources/RequestsFeature/Models/Request.swift b/Sources/RequestsFeature/Models/Request.swift
index 2048d399..595410d4 100644
--- a/Sources/RequestsFeature/Models/Request.swift
+++ b/Sources/RequestsFeature/Models/Request.swift
@@ -67,15 +67,3 @@ extension Contact.AuthStatus {
         }
     }
 }
-
-extension Contact: Hashable {
-    public func hash(into hasher: inout Hasher) {
-        hasher.combine(id)
-    }
-}
-
-extension Group: Hashable {
-    public func hash(into hasher: inout Hasher) {
-        hasher.combine(id)
-    }
-}
diff --git a/client-ios.xcworkspace/xcshareddata/swiftpm/Package.resolved b/client-ios.xcworkspace/xcshareddata/swiftpm/Package.resolved
index 5bc88ee5..9fabe939 100644
--- a/client-ios.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ b/client-ios.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -50,7 +50,7 @@
       "kind" : "remoteSourceControl",
       "location" : "https://git.xx.network/elixxir/client-ios-db.git",
       "state" : {
-        "revision" : "452392e032d52b217a20cd0f9de3b289f12fe444"
+        "revision" : "eb071f08000b2b7646e45e7a5f55bdc9ad6dbcfa"
       }
     },
     {
-- 
GitLab