Skip to content

Commit

Permalink
Added missing overrides
Browse files Browse the repository at this point in the history
Signed-off-by: Arnau Mora Gras <[email protected]>
  • Loading branch information
ArnyminerZ committed Apr 10, 2024
1 parent 825306e commit a1ef8d9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/src/main/java/at/bitfire/icsdroid/model/ValidationModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import at.bitfire.icsdroid.Constants
import at.bitfire.icsdroid.HttpUtils.toURI
import at.bitfire.icsdroid.HttpUtils.toUri
import at.bitfire.icsdroid.ui.ResourceInfo
import java.io.InputStream
import java.io.InputStreamReader
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import net.fortuna.ical4j.model.property.Color
import okhttp3.MediaType
import java.io.InputStream
import java.io.InputStreamReader

class ValidationModel(application: Application): AndroidViewModel(application) {

Expand All @@ -43,7 +43,7 @@ class ValidationModel(application: Application): AndroidViewModel(application) {

val info = ResourceInfo(originalUri)
val downloader = object: CalendarFetcher(getApplication(), originalUri) {
override fun onSuccess(
override suspend fun onSuccess(
data: InputStream,
contentType: MediaType?,
eTag: String?,
Expand Down Expand Up @@ -75,13 +75,13 @@ class ValidationModel(application: Application): AndroidViewModel(application) {
result.postValue(info)
}

override fun onNewPermanentUrl(target: Uri) {
override suspend fun onNewPermanentUrl(target: Uri) {
Log.i(Constants.TAG, "Got permanent redirect when validating, saving new URL: $target")
val location = uri.toURI().resolve(target.toURI())
info.uri = location.toUri()
}

override fun onError(error: Exception) {
override suspend fun onError(error: Exception) {
Log.e(Constants.TAG, "Couldn't validate calendar", error)
info.exception = error
result.postValue(info)
Expand Down

0 comments on commit a1ef8d9

Please sign in to comment.