mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Fix preupload in new Media Send flow.
This commit is contained in:
@@ -142,7 +142,7 @@ class MediaSelectionRepository(context: Context) {
|
||||
}
|
||||
|
||||
fun isLocalSelfSend(recipient: Recipient?, isSms: Boolean): Boolean {
|
||||
return !MessageSender.isLocalSelfSend(context, recipient, isSms)
|
||||
return MessageSender.isLocalSelfSend(context, recipient, isSms)
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
|
||||
@@ -68,7 +68,12 @@ class MediaSelectionViewModel(
|
||||
init {
|
||||
val recipientId = destination.getRecipientId()
|
||||
if (recipientId != null) {
|
||||
store.update(Recipient.live(recipientId).liveData) { r, s -> s.copy(recipient = r) }
|
||||
store.update(Recipient.live(recipientId).liveData) { r, s ->
|
||||
s.copy(
|
||||
recipient = r,
|
||||
isPreUploadEnabled = shouldPreUpload(s.isMeteredConnection, s.transportOption.isSms, r)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (initialMedia.isNotEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user