mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-12 03:04:20 +00:00
refactor: remove test logs
This commit is contained in:
parent
6fd1a82bed
commit
e389044f25
@ -143,17 +143,12 @@ class LokiMessageDatabase(context: Context, helper: SQLCipherOpenHelper) : Datab
|
|||||||
messages.add(cursor.getLong(Companion.messageID) to cursor.getLong(Companion.serverID))
|
messages.add(cursor.getLong(Companion.messageID) to cursor.getLong(Companion.serverID))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Log.d("Test", "Need to delete ${messages.size} number of messages")
|
|
||||||
|
|
||||||
var deletedCount = 0L
|
var deletedCount = 0L
|
||||||
|
|
||||||
database.beginTransaction()
|
database.beginTransaction()
|
||||||
messages.forEach { (messageId, serverId) ->
|
messages.forEach { (messageId, serverId) ->
|
||||||
deletedCount += database.delete(messageIDTable, "${Companion.messageID} = ? AND ${Companion.serverID} = ?", arrayOf(messageId.toString(), serverId.toString()))
|
deletedCount += database.delete(messageIDTable, "${Companion.messageID} = ? AND ${Companion.serverID} = ?", arrayOf(messageId.toString(), serverId.toString()))
|
||||||
}
|
}
|
||||||
Log.d("Test", "Deleted $deletedCount from messageIDTable")
|
|
||||||
val mappingDeleted = database.delete(messageThreadMappingTable, "${Companion.threadID} = ?", arrayOf(threadId.toString()))
|
val mappingDeleted = database.delete(messageThreadMappingTable, "${Companion.threadID} = ?", arrayOf(threadId.toString()))
|
||||||
Log.d("Test", "Deleted $mappingDeleted from mapping table")
|
|
||||||
database.setTransactionSuccessful()
|
database.setTransactionSuccessful()
|
||||||
} finally {
|
} finally {
|
||||||
database.endTransaction()
|
database.endTransaction()
|
||||||
|
Loading…
Reference in New Issue
Block a user