mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-17 21:41:46 +00:00
Cleaned up the outdated message logic
This commit is contained in:
@@ -1221,11 +1221,6 @@ open class Storage(context: Context, helper: SQLCipherOpenHelper, private val co
|
||||
recipientDb.setRecipientHash(recipient, recipientHash)
|
||||
}
|
||||
|
||||
override fun getThreadArchived(threadId: Long): Boolean {
|
||||
val threadDB = DatabaseComponent.get(context).threadDatabase()
|
||||
return threadDB.getThreadArchived(threadId)
|
||||
}
|
||||
|
||||
override fun getLastUpdated(threadID: Long): Long {
|
||||
val threadDB = DatabaseComponent.get(context).threadDatabase()
|
||||
return threadDB.getLastUpdated(threadID)
|
||||
|
@@ -658,24 +658,6 @@ public class ThreadDatabase extends Database {
|
||||
return getOrCreateThreadIdFor(recipient, DistributionTypes.DEFAULT);
|
||||
}
|
||||
|
||||
public boolean getThreadArchived(long threadId) {
|
||||
SQLiteDatabase db = databaseHelper.getReadableDatabase();
|
||||
Cursor cursor = null;
|
||||
|
||||
try {
|
||||
cursor = db.query(TABLE_NAME, null, ID + " = ?", new String[] {threadId+""}, null, null, null);
|
||||
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
return (cursor.getInt(cursor.getColumnIndexOrThrow(ARCHIVED)) == 1);
|
||||
}
|
||||
} finally {
|
||||
if (cursor != null)
|
||||
cursor.close();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setThreadArchived(long threadId) {
|
||||
ContentValues contentValues = new ContentValues(1);
|
||||
contentValues.put(ARCHIVED, 1);
|
||||
|
Reference in New Issue
Block a user