mirror of
https://github.com/pachli/pachli-android.git
synced 2025-02-01 09:57:16 +01:00
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) {
|
||||
transactionProvider {
|
||||
val ids = timelineDao.getMostRecentNStatusIds(accountId, 40)
|
||||
val ids = timelineDao.getMostRecentNStatusIds(accountId, k)
|
||||
timelineDao.deleteRange(accountId, ids.last(), ids.first())
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user