Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Commit

Permalink
Fix displaying renew and return LCP errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mickael-menu committed Oct 27, 2020
1 parent c5da984 commit 6d91600
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import org.jetbrains.anko.design.coordinatorLayout
import org.jetbrains.anko.design.longSnackbar
import org.joda.time.DateTime
import org.joda.time.format.DateTimeFormat
import org.readium.r2.shared.UserException
import org.readium.r2.testapp.utils.extensions.color
import java.io.File
import kotlin.coroutines.CoroutineContext
Expand Down Expand Up @@ -294,7 +295,8 @@ class DRMManagementActivity : AppCompatActivity(), CoroutineScope {
newEndDate?.toString(DateTimeFormat.shortDateTime())
}.onFailure { exception ->
dismiss()
exception.localizedMessage?.let { longSnackbar(it) }
(exception as? UserException)?.getUserMessage(this@DRMManagementActivity)
?.let { longSnackbar(it) }
}
}
}
Expand Down Expand Up @@ -328,7 +330,8 @@ class DRMManagementActivity : AppCompatActivity(), CoroutineScope {
dismiss()
finish()
}.onFailure { exception ->
exception.localizedMessage?.let { longSnackbar(it) }
(exception as? UserException)?.getUserMessage(this@DRMManagementActivity)
?.let { longSnackbar(it) }
}
}
}
Expand Down

0 comments on commit 6d91600

Please sign in to comment.