mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-03-17 21:31:57 +01:00
Fixes the extra empty kind 20 post when uploading videos.
This commit is contained in:
parent
f94feebbd7
commit
617f1ba2a6
@ -171,22 +171,26 @@ open class NewMediaModel : ViewModel() {
|
||||
}
|
||||
|
||||
val imageJobs =
|
||||
listOf(
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
withTimeoutOrNull(30000) {
|
||||
suspendCancellableCoroutine { continuation ->
|
||||
account?.sendAllAsOnePictureEvent(
|
||||
imageUrls,
|
||||
caption,
|
||||
sensitiveContent,
|
||||
relayList,
|
||||
) {
|
||||
continuation.resume(true)
|
||||
if (imageUrls.isNotEmpty()) {
|
||||
listOf(
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
withTimeoutOrNull(30000) {
|
||||
suspendCancellableCoroutine { continuation ->
|
||||
account?.sendAllAsOnePictureEvent(
|
||||
imageUrls,
|
||||
caption,
|
||||
sensitiveContent,
|
||||
relayList,
|
||||
) {
|
||||
continuation.resume(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
},
|
||||
)
|
||||
} else {
|
||||
emptyList()
|
||||
}
|
||||
|
||||
nip95jobs.joinAll()
|
||||
videoJobs.joinAll()
|
||||
|
Loading…
x
Reference in New Issue
Block a user