refactor accountUpdateSource from Call to coroutine (#4386)

It is the last place where we used a Call 🥳
This commit is contained in:
Konrad Pozniak 2024-05-03 13:22:04 +02:00 committed by GitHub
commit d5a01f671c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 26 deletions

View file

@ -49,7 +49,6 @@ import com.keylesspalace.tusky.entity.Translation
import com.keylesspalace.tusky.entity.TrendingTag
import okhttp3.MultipartBody
import okhttp3.RequestBody
import retrofit2.Call
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.DELETE
@ -292,11 +291,11 @@ interface MastodonApi {
@FormUrlEncoded
@PATCH("api/v1/accounts/update_credentials")
fun accountUpdateSource(
suspend fun accountUpdateSource(
@Field("source[privacy]") privacy: String?,
@Field("source[sensitive]") sensitive: Boolean?,
@Field("source[language]") language: String?
): Call<Account>
): NetworkResult<Account>
@Multipart
@PATCH("api/v1/accounts/update_credentials")