improve code
This commit is contained in:
parent
3d63596b0c
commit
478dd8c601
|
@ -145,7 +145,7 @@ class MediaUploader @Inject constructor(
|
|||
*/
|
||||
fun cancelUploadScope(vararg localMediaIds: Int) {
|
||||
localMediaIds.forEach { localId ->
|
||||
uploads[localId]?.scope?.cancel()
|
||||
uploads.remove(localId)?.scope?.cancel()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -144,6 +144,7 @@ class SendStatusService : Service(), Injectable {
|
|||
is UploadEvent.ErrorEvent -> {
|
||||
Log.w(TAG, "failed uploading media", uploadState.error)
|
||||
failSending(statusId)
|
||||
stopSelfWhenDone()
|
||||
return@launch
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue