This commit is contained in:
greenart7c3
2025-01-10 15:41:23 -03:00
parent eae6217c53
commit 9e6a412fff
2 changed files with 11 additions and 5 deletions
+2 -2
View File
@@ -16,8 +16,8 @@ android {
applicationId "com.greenart7c3.nostrsigner"
minSdk 26
targetSdk 35
versionCode 125
versionName "3.1.6"
versionCode 126
versionName "3.1.7"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
@@ -128,8 +128,10 @@ class NostrSigner : Application() {
if (countHistory > 0) {
status.value = "Deleting $countHistory old history entries"
var logs = database.applicationDao().getOldHistory(oneWeekAgo)
var count = 0
while (logs.isNotEmpty()) {
status.value = "Deleting 100/$countHistory old history entries"
count++
status.value = "Deleting ${100 * count}/$countHistory old history entries"
logs.forEach { history ->
database.applicationDao().deleteHistory(history)
}
@@ -141,8 +143,10 @@ class NostrSigner : Application() {
if (countNotification > 0) {
status.value = "Deleting $countNotification old notification entries"
var logs = database.applicationDao().getOldNotification(oneWeekAgo)
var count = 0
while (logs.isNotEmpty()) {
status.value = "Deleting 100/$countNotification old notification entries"
count++
status.value = "Deleting ${100 * count}/$countNotification old notification entries"
logs.forEach { history ->
database.applicationDao().deleteNotification(history)
}
@@ -154,8 +158,10 @@ class NostrSigner : Application() {
if (countLog > 0) {
status.value = "Deleting $countLog old notification entries"
var logs = database.applicationDao().getOldLog(oneWeek)
var count = 0
while (logs.isNotEmpty()) {
status.value = "Deleting 100/$countLog old log entries"
count++
status.value = "Deleting ${100 * count}/$countLog old log entries"
logs.forEach { history ->
database.applicationDao().deleteLog(history)
}