mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-22 12:08:34 +00:00
Load drafts from DB when opening conversation from notifications.
This commit is contained in:
@@ -25,6 +25,7 @@ import java.util.Objects;
|
||||
public class ConversationIntents {
|
||||
|
||||
private static final String BUBBLE_AUTHORITY = "bubble";
|
||||
private static final String NOTIFICATION_CUSTOM_SCHEME = "custom";
|
||||
private static final String EXTRA_RECIPIENT = "recipient_id";
|
||||
private static final String EXTRA_THREAD_ID = "thread_id";
|
||||
private static final String EXTRA_TEXT = "draft_text";
|
||||
@@ -89,6 +90,10 @@ public class ConversationIntents {
|
||||
return uri != null && Objects.equals(uri.getAuthority(), BUBBLE_AUTHORITY);
|
||||
}
|
||||
|
||||
static boolean isNotificationIntentUri(@Nullable Uri uri) {
|
||||
return uri != null && Objects.equals(uri.getScheme(), NOTIFICATION_CUSTOM_SCHEME);
|
||||
}
|
||||
|
||||
final static class Args {
|
||||
private final RecipientId recipientId;
|
||||
private final long threadId;
|
||||
|
||||
@@ -1684,7 +1684,7 @@ public class ConversationParentFragment extends Fragment
|
||||
return setMedia(draftMedia, draftMediaType);
|
||||
}
|
||||
|
||||
if (draftText == null && (draftMedia == null || ConversationIntents.isBubbleIntentUri(draftMedia)) && draftMediaType == null) {
|
||||
if (draftText == null && (draftMedia == null || ConversationIntents.isBubbleIntentUri(draftMedia) || ConversationIntents.isNotificationIntentUri(draftMedia)) && draftMediaType == null) {
|
||||
Log.d(TAG, "Initializing draft from database");
|
||||
return initializeDraftFromDatabase();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user