Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57157e27 authored by Matheo Levallois's avatar Matheo Levallois
Browse files

refactor: apply suggestion

parent 20f36f34
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ class ValidateAppAgeLimitUseCase @Inject constructor(
            )

            hasNoContentRatingOnGPlay(app) -> ResultSupreme.Success(
                data = ContentRatingValidity(false, requestPin = true)
                data = ContentRatingValidity(isValid = false, requestPin = true)
            )

            isParentalGuidance(app) -> ResultSupreme.Success(
@@ -161,9 +161,7 @@ class ValidateAppAgeLimitUseCase @Inject constructor(

    private suspend fun verifyContentRatingExists(app: AppInstall): Boolean {
        if (app.contentRating.id.isEmpty()) {
            var fetchedContentRating : ContentRating? = null
            try {
                fetchedContentRating =
            val fetchedContentRating = try {
                    gPlayContentRatingRepository.getEnglishContentRating(app.packageName)
            } catch(exception: InternalException.AppNotFound){
                Timber.d("Error fetching age ratings for the package : ${app.packageName}" )