Load drafts from DB when opening conversation from notifications.
This commit is contained in:
parent
aac1d0cedb
commit
87c366223a
2 changed files with 6 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue