refactor: Use k parameter to deleteFirstKStatuses (#1065)
This commit is contained in:
parent
0f5fa82d40
commit
cdbeb8929c
|
@ -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())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue