This commit is contained in:
Niels Andriesse 2019-08-26 15:32:02 +10:00
parent 488bf56aec
commit 0c4ea32269
2 changed files with 4 additions and 2 deletions

View File

@ -125,6 +125,8 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
db.execSQL(LokiAPIDatabase.getCreateLastMessageHashValueTableCommand());
db.execSQL(LokiAPIDatabase.getCreateReceivedMessageHashValuesTableCommand());
db.execSQL(LokiAPIDatabase.getCreateGroupChatAuthTokenTableCommand());
db.execSQL(LokiAPIDatabase.getCreateLastMessageServerIDTableCommand());
db.execSQL(LokiAPIDatabase.getCreateFirstMessageServerIDTableCommand());
db.execSQL(LokiPreKeyBundleDatabase.getCreateTableCommand());
db.execSQL(LokiPreKeyRecordDatabase.getCreateTableCommand());
db.execSQL(LokiMessageDatabase.getCreateTableCommand());

View File

@ -37,12 +37,12 @@ class LokiAPIDatabase(context: Context, helper: SQLCipherOpenHelper) : Database(
private val lastMessageServerIDCache = "loki_api_last_message_server_id_cache"
private val lastMessageServerIDCacheGroupID = "group_id"
private val lastMessageServerID = "last_message_server_id"
@JvmStatic val createLastMessageServerIDTableCommand = "CREATE TABLE $lastMessageServerIDCache ($lastMessageServerIDCacheGroupID INTEGER PRIMARY KEY, $lastMessageServerID INTEGER);"
@JvmStatic val createLastMessageServerIDTableCommand = "CREATE TABLE $lastMessageServerIDCache ($lastMessageServerIDCacheGroupID INTEGER PRIMARY KEY, $lastMessageServerID INTEGER DEFAULT 0);"
// First message server ID cache
private val firstMessageServerIDCache = "loki_api_first_message_server_id_cache"
private val firstMessageServerIDCacheGroupID = "group_id"
private val firstMessageServerID = "first_message_server_id"
@JvmStatic val createFirstMessageServerIDTableCommand = "CREATE TABLE $firstMessageServerIDCache ($firstMessageServerIDCacheGroupID INTEGER PRIMARY KEY, $firstMessageServerID INTEGER);"
@JvmStatic val createFirstMessageServerIDTableCommand = "CREATE TABLE $firstMessageServerIDCache ($firstMessageServerIDCacheGroupID INTEGER PRIMARY KEY, $firstMessageServerID INTEGER DEFAULT 0);"
}
override fun getSwarmCache(hexEncodedPublicKey: String): Set<LokiAPITarget>? {