Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

set threshold value to include 4gb

laurenspriem08a2080f46e7
diff --git a/mobile/native/android/apps/ensu/domain/src/main/kotlin/io/ente/ensu/domain/device/ChatDeviceCapability.kt b/mobile/native/android/apps/ensu/domain/src/main/kotlin/io/ente/ensu/domain/device/ChatDeviceCapability.kt
index ccd1897ab1..ef9b3d6c58 100644
--- a/mobile/native/android/apps/ensu/domain/src/main/kotlin/io/ente/ensu/domain/device/ChatDeviceCapability.kt
+++ b/mobile/native/android/apps/ensu/domain/src/main/kotlin/io/ente/ensu/domain/device/ChatDeviceCapability.kt
@@ -1,6 +1,9 @@
package io.ente.ensu.domain.device
-const val CHAT_MIN_RAM_BYTES: Long = 4_000_000_000L
+// Compared against the memory the OS reports (ActivityManager.totalMem), which runs
+// well below marketed RAM. 3.2 GB sits in the gap between 3 GB devices (~2.7-3.0 GB
+// reported) and 4 GB devices (~3.4-3.8 GB reported), so 4 GB devices pass and 3 GB don't.
+const val CHAT_MIN_RAM_BYTES: Long = 3_200_000_000L
sealed interface ChatDeviceCapability {
val totalMemoryBytes: Long?
diff --git a/mobile/native/darwin/Apps/Ensu/Ensu/Services/ModelSettingsStore.swift b/mobile/native/darwin/Apps/Ensu/Ensu/Services/ModelSettingsStore.swift
index 2c01f36982..3d666d5958 100644
--- a/mobile/native/darwin/Apps/Ensu/Ensu/Services/ModelSettingsStore.swift
+++ b/mobile/native/darwin/Apps/Ensu/Ensu/Services/ModelSettingsStore.swift
@@ -1,6 +1,9 @@
import Foundation
-let chatMinimumRAMBytes: UInt64 = 4_000_000_000
+// Compared against the memory the OS reports (ProcessInfo.physicalMemory), which runs
+// well below marketed RAM. 3.2 GB sits in the gap between 3 GB devices (~2.7-3.0 GB
+// reported) and 4 GB devices (~3.4-3.8 GB reported), so 4 GB devices pass and 3 GB don't.
+let chatMinimumRAMBytes: UInt64 = 3_200_000_000
enum ChatDeviceCapability: Equatable {
case supported(totalMemoryBytes: UInt64?)