From cdbeb8929cfa8ab88107d00def498018cdf18675 Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Wed, 30 Oct 2024 15:17:39 +0100 Subject: [PATCH] refactor: Use k parameter to deleteFirstKStatuses (#1065) --- app/src/main/java/app/pachli/usecase/DeveloperToolsUseCase.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/app/pachli/usecase/DeveloperToolsUseCase.kt b/app/src/main/java/app/pachli/usecase/DeveloperToolsUseCase.kt index c3470325b..9c1a996d1 100644 --- a/app/src/main/java/app/pachli/usecase/DeveloperToolsUseCase.kt +++ b/app/src/main/java/app/pachli/usecase/DeveloperToolsUseCase.kt @@ -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()) } }