From b2ea013787b4cdf6d996fa6853efea4de9488e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noe=CC=81=20Malzieu?= Date: Fri, 9 Aug 2024 10:55:00 +0200 Subject: [PATCH] Fix spacing --- ios/XMTPModule.swift | 50 ++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/ios/XMTPModule.swift b/ios/XMTPModule.swift index 965c31817..b0b49af8f 100644 --- a/ios/XMTPModule.swift +++ b/ios/XMTPModule.swift @@ -59,20 +59,20 @@ public class XMTPModule: Module { } // A method to disconnect all dbs - func dropAllLocalDatabaseConnections() throws { - for (_, client) in clients { - // Call the method on each client - try client.dropLocalDatabaseConnection() - } - } - - // A method to disconnect all dbs - func reconnectAllLocalDatabaseConnections() async throws { - for (_, client) in clients { - // Call the method on each client - try await client.reconnectLocalDatabase() - } - } + func dropAllLocalDatabaseConnections() throws { + for (_, client) in clients { + // Call the method on each client + try client.dropLocalDatabaseConnection() + } + } + + // A method to disconnect all dbs + func reconnectAllLocalDatabaseConnections() async throws { + for (_, client) in clients { + // Call the method on each client + try await client.reconnectLocalDatabase() + } + } } enum Error: Swift.Error { @@ -1475,18 +1475,18 @@ public class XMTPModule: Module { } return await client.contacts.isGroupDenied(groupId: groupId) } + + OnAppBecomesActive { + Task { + try await clientsManager.reconnectAllLocalDatabaseConnections() + } + } - OnAppBecomesActive { - Task { - try await clientsManager.reconnectAllLocalDatabaseConnections() - } - } - - OnAppEntersBackground { - Task { - try await clientsManager.dropAllLocalDatabaseConnections() - } - } + OnAppEntersBackground { + Task { + try await clientsManager.dropAllLocalDatabaseConnections() + } + } } //