mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 21:15:48 +00:00
Show drafts in conversation list snippets
// FREEBIE
This commit is contained in:
@@ -115,7 +115,7 @@ public class ThreadDatabase extends Database {
|
||||
|
||||
private void updateThread(long threadId, long count, String body, long date, long type)
|
||||
{
|
||||
ContentValues contentValues = new ContentValues(3);
|
||||
ContentValues contentValues = new ContentValues(4);
|
||||
contentValues.put(DATE, date - date % 1000);
|
||||
contentValues.put(MESSAGE_COUNT, count);
|
||||
contentValues.put(SNIPPET, body);
|
||||
@@ -126,6 +126,15 @@ public class ThreadDatabase extends Database {
|
||||
notifyConversationListListeners();
|
||||
}
|
||||
|
||||
public void updateSnippet(long threadId, String snippet, long type) {
|
||||
ContentValues contentValues = new ContentValues(3);
|
||||
contentValues.put(SNIPPET, snippet);
|
||||
contentValues.put(SNIPPET_TYPE, type);
|
||||
SQLiteDatabase db = databaseHelper.getWritableDatabase();
|
||||
db.update(TABLE_NAME, contentValues, ID + " = ?", new String[] {threadId + ""});
|
||||
notifyConversationListListeners();
|
||||
}
|
||||
|
||||
private void deleteThread(long threadId) {
|
||||
SQLiteDatabase db = databaseHelper.getWritableDatabase();
|
||||
db.delete(TABLE_NAME, ID_WHERE, new String[] {threadId+""});
|
||||
|
||||
Reference in New Issue
Block a user