refactor: Use k parameter to deleteFirstKStatuses (#1065)

This commit is contained in:
Nik Clayton 2024-10-30 15:17:39 +01:00 committed by GitHub
parent 0f5fa82d40
commit cdbeb8929c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ class DeveloperToolsUseCase @Inject constructor(
*/ */
suspend fun deleteFirstKStatuses(accountId: Long, k: Int) { suspend fun deleteFirstKStatuses(accountId: Long, k: Int) {
transactionProvider { transactionProvider {
val ids = timelineDao.getMostRecentNStatusIds(accountId, 40) val ids = timelineDao.getMostRecentNStatusIds(accountId, k)
timelineDao.deleteRange(accountId, ids.last(), ids.first()) timelineDao.deleteRange(accountId, ids.last(), ids.first())
} }
} }