From eaab0b1048edbd6fa83f90e41b8b2d5abc80168f Mon Sep 17 00:00:00 2001 From: Arne Date: Mon, 8 May 2023 17:26:20 +0200 Subject: [PATCH] replace cheogram cids with monocles --- build.gradle | 1 + .../eu/siacs/conversations/persistance/DatabaseBackend.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 18d0edbb4..8d9078197 100644 --- a/build.gradle +++ b/build.gradle @@ -99,6 +99,7 @@ dependencies { implementation 'com.github.singpolyma:Better-Link-Movement-Method:4df081e1e4' implementation project(':libs:AXML') implementation 'com.github.ipld:java-cid:v1.3.1' + implementation 'com.github.woltapp:blurhash:master' } diff --git a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java index 6e66704af..e60c1ce03 100644 --- a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java @@ -1055,7 +1055,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { public DownloadableFile getFileForCid(Cid cid) { SQLiteDatabase db = this.getReadableDatabase(); - Cursor cursor = db.query("cheogram.cids", new String[]{"path"}, "cid=?", new String[]{cid.toString()}, null, null, null); + Cursor cursor = db.query("monocles.cids", new String[]{"path"}, "cid=?", new String[]{cid.toString()}, null, null, null); DownloadableFile f = null; if (cursor.moveToNext()) { f = new DownloadableFile(cursor.getString(0)); @@ -1066,7 +1066,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { public boolean isBlockedMedia(Cid cid) { SQLiteDatabase db = this.getReadableDatabase(); - Cursor cursor = db.query("cheogram.blocked_media", new String[]{"count(*)"}, "cid=?", new String[]{cid.toString()}, null, null, null); + Cursor cursor = db.query("monocles.blocked_media", new String[]{"count(*)"}, "cid=?", new String[]{cid.toString()}, null, null, null); boolean is = false; if (cursor.moveToNext()) { is = cursor.getInt(0) > 0;