wip
This commit is contained in:
parent
eed175fe1f
commit
44ef6c25ba
|
@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue