mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Reset upload progress if attachment upload is interrupted.
This commit is contained in:
@@ -529,6 +529,8 @@ class TransferControlView @JvmOverloads constructor(context: Context, attrs: Att
|
||||
val existingEvent = mutableMap[attachment]
|
||||
if (existingEvent == null || updateEvent.completed > existingEvent.completed) {
|
||||
mutableMap[attachment] = updateEvent
|
||||
} else if (updateEvent.completed < 0) {
|
||||
mutableMap.remove(attachment)
|
||||
}
|
||||
verboseLog("onEventAsync compression update")
|
||||
return@updateState it.copy(compressionProgress = mutableMap.toMap())
|
||||
@@ -538,6 +540,8 @@ class TransferControlView @JvmOverloads constructor(context: Context, attrs: Att
|
||||
val existingEvent = mutableMap[attachment]
|
||||
if (existingEvent == null || updateEvent.completed > existingEvent.completed) {
|
||||
mutableMap[attachment] = updateEvent
|
||||
} else if (updateEvent.completed < 0) {
|
||||
mutableMap.remove(attachment)
|
||||
}
|
||||
verboseLog("onEventAsync network update")
|
||||
return@updateState it.copy(networkProgress = mutableMap.toMap())
|
||||
|
||||
Reference in New Issue
Block a user