通知処理済みフラグの削除処理が終わらないバグを修正
This commit is contained in:
parent
54eb33c3d9
commit
975a3e45a8
|
@ -130,7 +130,7 @@ android {
|
|||
def branch = providers.exec {
|
||||
commandLine("git", "rev-parse", "--abbrev-ref", "HEAD")
|
||||
}.standardOutput.asText.get()?.trim() ?: "(no branch)"
|
||||
|
||||
|
||||
outputFileName = "SubwayTooter-${branch}-${flavor}-${versionCode}-${versionName}-${date}.apk"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,10 +75,11 @@ class NotificationShown(
|
|||
log.i("$acct size=$size")
|
||||
// 掃除する頻度を下げるため、ここのしきい値は倍にする
|
||||
if (size <= keep * 2) continue
|
||||
while (true) {
|
||||
var deleteCount = 0
|
||||
while (deleteCount++ < 3) {
|
||||
// 一度に削除したい数
|
||||
val step = min(100, size - keep)
|
||||
if (step <= 0) continue
|
||||
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…
Reference in New Issue