mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 16:49:40 +01:00
Optimize more during low disk situations.
This commit is contained in:
committed by
jeffrey-signal
parent
8eef29cd77
commit
872c7c5ce2
@@ -1112,7 +1112,7 @@ class AttachmentTable(
|
||||
* Marking offloaded only clears the strong references to the on disk file and clears other local file data like hashes.
|
||||
* Another operation must run to actually delete the data from disk. See [deleteAbandonedAttachmentFiles].
|
||||
*/
|
||||
fun markEligibleAttachmentsAsOptimized() {
|
||||
fun markEligibleAttachmentsAsOptimized(minimumAge: Duration = 30.days) {
|
||||
val now = System.currentTimeMillis()
|
||||
|
||||
val subSelect = """
|
||||
@@ -1136,7 +1136,7 @@ class AttachmentTable(
|
||||
)
|
||||
AND
|
||||
(
|
||||
${MessageTable.TABLE_NAME}.${MessageTable.DATE_RECEIVED} < ${now - 30.days.inWholeMilliseconds}
|
||||
${MessageTable.TABLE_NAME}.${MessageTable.DATE_RECEIVED} < ${now - minimumAge.inWholeMilliseconds}
|
||||
)
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user