Fixes the extra empty kind 20 post when uploading videos.
This commit is contained in:
@@ -171,22 +171,26 @@ open class NewMediaModel : ViewModel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val imageJobs =
|
val imageJobs =
|
||||||
listOf(
|
if (imageUrls.isNotEmpty()) {
|
||||||
viewModelScope.launch(Dispatchers.IO) {
|
listOf(
|
||||||
withTimeoutOrNull(30000) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
suspendCancellableCoroutine { continuation ->
|
withTimeoutOrNull(30000) {
|
||||||
account?.sendAllAsOnePictureEvent(
|
suspendCancellableCoroutine { continuation ->
|
||||||
imageUrls,
|
account?.sendAllAsOnePictureEvent(
|
||||||
caption,
|
imageUrls,
|
||||||
sensitiveContent,
|
caption,
|
||||||
relayList,
|
sensitiveContent,
|
||||||
) {
|
relayList,
|
||||||
continuation.resume(true)
|
) {
|
||||||
|
continuation.resume(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
)
|
||||||
)
|
} else {
|
||||||
|
emptyList()
|
||||||
|
}
|
||||||
|
|
||||||
nip95jobs.joinAll()
|
nip95jobs.joinAll()
|
||||||
videoJobs.joinAll()
|
videoJobs.joinAll()
|
||||||
|
|||||||
Reference in New Issue
Block a user