Use NetworkResult in MediaUploadApi (#2577)
This commit is contained in:
parent
e1c8461423
commit
530eb61505
2 changed files with 3 additions and 1 deletions
|
@ -23,6 +23,7 @@ import android.util.Log
|
|||
import android.webkit.MimeTypeMap
|
||||
import androidx.core.content.FileProvider
|
||||
import androidx.core.net.toUri
|
||||
import at.connyduck.calladapter.networkresult.getOrThrow
|
||||
import com.keylesspalace.tusky.BuildConfig
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.components.compose.ComposeActivity.QueuedMedia
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.keylesspalace.tusky.network
|
||||
|
||||
import at.connyduck.calladapter.networkresult.NetworkResult
|
||||
import com.keylesspalace.tusky.entity.MediaUploadResult
|
||||
import okhttp3.MultipartBody
|
||||
import retrofit2.http.Multipart
|
||||
|
@ -15,5 +16,5 @@ interface MediaUploadApi {
|
|||
suspend fun uploadMedia(
|
||||
@Part file: MultipartBody.Part,
|
||||
@Part description: MultipartBody.Part? = null
|
||||
): Result<MediaUploadResult>
|
||||
): NetworkResult<MediaUploadResult>
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue