mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +00:00
Update thread timestamp on draft creation.
Fixes #1055 Closes #2909 // FREEBIE
This commit is contained in:
parent
e4e24f7ae5
commit
f5724795cf
@ -895,7 +895,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
if (threadId == -1) threadId = threadDatabase.getThreadIdFor(getRecipients(), thisDistributionType);
|
||||
|
||||
draftDatabase.insertDrafts(new MasterCipher(thisMasterSecret), threadId, drafts);
|
||||
threadDatabase.updateSnippet(threadId, drafts.getSnippet(ConversationActivity.this), Types.BASE_DRAFT_TYPE);
|
||||
threadDatabase.updateSnippet(threadId, drafts.getSnippet(ConversationActivity.this), System.currentTimeMillis(), Types.BASE_DRAFT_TYPE);
|
||||
} else if (threadId > 0) {
|
||||
threadDatabase.update(threadId);
|
||||
}
|
||||
|
@ -130,8 +130,10 @@ public class ThreadDatabase extends Database {
|
||||
notifyConversationListListeners();
|
||||
}
|
||||
|
||||
public void updateSnippet(long threadId, String snippet, long type) {
|
||||
public void updateSnippet(long threadId, String snippet, long date, long type) {
|
||||
ContentValues contentValues = new ContentValues(3);
|
||||
|
||||
contentValues.put(DATE, date - date % 1000);
|
||||
contentValues.put(SNIPPET, snippet);
|
||||
contentValues.put(SNIPPET_TYPE, type);
|
||||
SQLiteDatabase db = databaseHelper.getWritableDatabase();
|
||||
|
Loading…
x
Reference in New Issue
Block a user