Add lazy thread creation throughout in preparation for CFV2.

This commit is contained in:
Alex Hart
2023-07-12 15:33:34 -03:00
committed by Clark Chen
parent 6ca9cb6da1
commit 8f253ffc43
24 changed files with 176 additions and 82 deletions

View File

@@ -48,9 +48,9 @@ public class SmsSendtoActivity extends Activity {
Toast.makeText(this, R.string.ConversationActivity_specify_recipient, Toast.LENGTH_LONG).show();
} else {
Recipient recipient = Recipient.external(this, destination.getDestination());
long threadId = SignalDatabase.threads().getThreadIdIfExistsFor(recipient.getId());
long threadId = SignalDatabase.threads().getOrCreateThreadIdFor(recipient);
nextIntent = ConversationIntents.createBuilder(this, recipient.getId(), threadId)
nextIntent = ConversationIntents.createBuilderSync(this, recipient.getId(), threadId)
.withDraftText(destination.getBody())
.build();
}