From eb9e16fc83c42825ff5aba8979e73eff93b8f139 Mon Sep 17 00:00:00 2001
From: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
Date: Mon, 25 Sep 2023 09:19:19 -0400
Subject: [PATCH] data transfer: set default limit to 20MB

Change-Id: Id35c24638f0434e030b5e5a15b635172e5afd2ab
---
 Ring/Ring/AppDelegate.swift | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Ring/Ring/AppDelegate.swift b/Ring/Ring/AppDelegate.swift
index 93c16442d..dd0b86273 100644
--- a/Ring/Ring/AppDelegate.swift
+++ b/Ring/Ring/AppDelegate.swift
@@ -285,6 +285,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
                 // set selected account if exists
                 self.appCoordinator.start()
                 if !self.accountService.hasAccounts() {
+                    // Set default download transfer limit to 20MB.
+                    let userDefaults = UserDefaults.standard
+                    if userDefaults.object(forKey: acceptTransferLimitKey) == nil {
+                        userDefaults.set(20, forKey: acceptTransferLimitKey)
+                    }
                     return
                 }
                 if self.accountService.hasAccountWithProxyEnabled() {
-- 
GitLab