while内部でtrueを使わない
This commit is contained in:
parent
f95b9910d1
commit
dd46422344
@ -77,10 +77,11 @@ class NotificationShown(
|
||||
if (size <= keep * 2) continue
|
||||
// アカウントごとに3回の削除を一度に行い、残りは次回以降にすませる
|
||||
var deleteCount = 0
|
||||
while (deleteCount++ < 3) {
|
||||
while (size > keep && deleteCount++ < 3) {
|
||||
// 一度に削除したい数
|
||||
val step = min(1000, size - keep)
|
||||
if (step <= 0) break
|
||||
|
||||
// 古いものからstep件目の時刻を読む
|
||||
val time = db.rawQuery(
|
||||
"select $COL_TIME_CREATE from $table where $COL_ACCT=? order by $COL_TIME_CREATE asc limit ?",
|
||||
|
Loading…
x
Reference in New Issue
Block a user