This commit is contained in:
fmodf 2024-08-09 16:33:22 +02:00
parent eed175fe1f
commit 44ef6c25ba
2 changed files with 6 additions and 2 deletions

View file

@ -43,7 +43,7 @@ private extension ArchivedMessagesMiddleware {
if let lastDate = messages.first?.date { if let lastDate = messages.first?.date {
return lastDate return lastDate
} else { } else {
return Calendar.current.date(byAdding: .day, value: -Const.mamRequestLength, to: Date()) ?? Date() return Calendar.current.date(byAdding: .day, value: -Const.mamRequestDaysLength, to: Date()) ?? Date()
} }
} }
} }

View file

@ -45,5 +45,9 @@ enum Const {
static let attachmentPreviewSize = UIScreen.main.bounds.width * 0.5 static let attachmentPreviewSize = UIScreen.main.bounds.width * 0.5
// Lenght in days for MAM request // Lenght in days for MAM request
static let mamRequestLength = 30 static let mamRequestDaysLength = 30
// Limits for messages pagination
static let messagesPageMin = 20
static let messagesPageMax = 100
} }