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

Commit 215c52aa authored by Jonathan Klee's avatar Jonathan Klee
Browse files

style: fix MultilineIfElse detekt errors

parent 155a5de1
Loading
Loading
Loading
Loading
Loading
+0 −52
Original line number Diff line number Diff line
@@ -119,58 +119,6 @@
    <ID>MaximumLineLength:UpdatesNotifier.kt$UpdatesNotifier$ </ID>
    <ID>MaximumLineLength:UpdatesWorker.kt$UpdatesWorker$ </ID>
    <ID>MayBeConst:EcloudApiInterface.kt$EcloudApiInterface.Companion$val BASE_URL = "https://eu.gtoken.ecloud.global/"</ID>
    <ID>MultiLineIfElse:AC2DMTask.kt$AC2DMTask$return PlayResponse()</ID>
    <ID>MultiLineIfElse:AnonymousLoginManager.kt$AnonymousLoginManager$""</ID>
    <ID>MultiLineIfElse:AnonymousLoginManager.kt$AnonymousLoginManager$"\nError message: $this"</ID>
    <ID>MultiLineIfElse:AppLoungeDataStore.kt$AppLoungeDataStore$User.UNAVAILABLE</ID>
    <ID>MultiLineIfElse:AppLoungeDataStore.kt$AppLoungeDataStore$User.valueOf(this)</ID>
    <ID>MultiLineIfElse:AppLoungeDataStore.kt$AppLoungeDataStore$it.remove(AUTHDATA)</ID>
    <ID>MultiLineIfElse:AppLoungeDataStore.kt$AppLoungeDataStore$it.remove(USERTYPE)</ID>
    <ID>MultiLineIfElse:AppLoungeDataStore.kt$AppLoungeDataStore$it[AUTHDATA] = json.encodeToString(authData)</ID>
    <ID>MultiLineIfElse:AppLoungeDataStore.kt$AppLoungeDataStore$it[USERTYPE] = user.name</ID>
    <ID>MultiLineIfElse:AppLoungePackageManager.kt$AppLoungePackageManager$PendingIntent.FLAG_UPDATE_CURRENT</ID>
    <ID>MultiLineIfElse:AppLoungePackageManager.kt$AppLoungePackageManager$PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE</ID>
    <ID>MultiLineIfElse:AppTag.kt$AppTag$"Open Source"</ID>
    <ID>MultiLineIfElse:AppTag.kt$AppTag$this::class.java.simpleName</ID>
    <ID>MultiLineIfElse:ApplicationFragment.kt$ApplicationFragment$getString(R.string.not_available)</ID>
    <ID>MultiLineIfElse:ApplicationFragment.kt$ApplicationFragment$getString(R.string.update)</ID>
    <ID>MultiLineIfElse:ApplicationListRVAdapter.kt$ApplicationListRVAdapter$View.INVISIBLE</ID>
    <ID>MultiLineIfElse:ApplicationListRVAdapter.kt$ApplicationListRVAdapter$View.VISIBLE</ID>
    <ID>MultiLineIfElse:ApplicationListRVAdapter.kt$ApplicationListRVAdapter$context.getString(R.string.not_available)</ID>
    <ID>MultiLineIfElse:ApplicationListRVAdapter.kt$ApplicationListRVAdapter$context.getString(R.string.update)</ID>
    <ID>MultiLineIfElse:ApplicationListRVAdapter.kt$ApplicationListRVAdapter$view.context.getString(R.string.retry)</ID>
    <ID>MultiLineIfElse:ApplicationListRVAdapter.kt$ApplicationListRVAdapter$view.context.getText(R.string.update)</ID>
    <ID>MultiLineIfElse:ApplicationListRVAdapter.kt$ApplicationListRVAdapter$width = maxAllowedWidth</ID>
    <ID>MultiLineIfElse:ApplicationListViewModel.kt$ApplicationListViewModel$CleanApkException( result.isTimeout(), result.message.ifBlank { "Data load error" } )</ID>
    <ID>MultiLineIfElse:ApplicationListViewModel.kt$ApplicationListViewModel$GPlayException( result.isTimeout(), result.message.ifBlank { "Data load error" } )</ID>
    <ID>MultiLineIfElse:CategoriesViewModel.kt$CategoriesViewModel$CleanApkException( data.status == ResultStatus.TIMEOUT, data.status.message.ifBlank { "Data load error" } )</ID>
    <ID>MultiLineIfElse:CategoriesViewModel.kt$CategoriesViewModel$GPlayException( data.status == ResultStatus.TIMEOUT, data.status.message.ifBlank { "Data load error" } )</ID>
    <ID>MultiLineIfElse:CategoryUtils.kt$CategoryUtils$category.id</ID>
    <ID>MultiLineIfElse:CategoryUtils.kt$CategoryUtils$category.title</ID>
    <ID>MultiLineIfElse:GplayApiExtensions.kt$-1.0</ID>
    <ID>MultiLineIfElse:HomeChildRVAdapter.kt$HomeChildRVAdapter$context.getString(R.string.not_available)</ID>
    <ID>MultiLineIfElse:HomeChildRVAdapter.kt$HomeChildRVAdapter$context.getString(R.string.update)</ID>
    <ID>MultiLineIfElse:MaterialButtonUtils.kt$ContextCompat.getColorStateList(this.context, android.R.color.transparent)</ID>
    <ID>MultiLineIfElse:NativeDeviceInfoProviderModule.kt$NativeDeviceInfoProviderModule$"unknown"</ID>
    <ID>MultiLineIfElse:NativeDeviceInfoProviderModule.kt$NativeDeviceInfoProviderModule$Build.getRadioVersion()</ID>
    <ID>MultiLineIfElse:NativeGsfVersionProvider.kt$NativeGsfVersionProvider$GOOGLE_SERVICES_VERSION_CODE</ID>
    <ID>MultiLineIfElse:NativeGsfVersionProvider.kt$NativeGsfVersionProvider$gsfVersionCode</ID>
    <ID>MultiLineIfElse:PlayStoreAuthenticator.kt$PlayStoreAuthenticator$ResultSupreme.Success(formatAuthData(this.data!!))</ID>
    <ID>MultiLineIfElse:PlayStoreAuthenticator.kt$PlayStoreAuthenticator$it.data!!</ID>
    <ID>MultiLineIfElse:PlayStoreAuthenticator.kt$PlayStoreAuthenticator$null</ID>
    <ID>MultiLineIfElse:PlayStoreAuthenticator.kt$PlayStoreAuthenticator$return AuthObject.GPlayAuth(it, user)</ID>
    <ID>MultiLineIfElse:PlayStoreAuthenticator.kt$PlayStoreAuthenticator$this</ID>
    <ID>MultiLineIfElse:PlayStoreAuthenticator.kt$PlayStoreAuthenticator$try { json.decodeFromString&lt;AuthData&gt;(authJson) } catch (e: Exception) { e.printStackTrace() null }</ID>
    <ID>MultiLineIfElse:PlayStoreRepository.kt$PlayStoreRepository$Category.Type.APPLICATION</ID>
    <ID>MultiLineIfElse:PlayStoreRepository.kt$PlayStoreRepository$Category.Type.GAME</ID>
    <ID>MultiLineIfElse:PrivacyInfoViewModel.kt$PrivacyInfoViewModel$appPrivacyPrivacyInfoResult</ID>
    <ID>MultiLineIfElse:PrivacyScoreRepositoryImpl.kt$PrivacyScoreRepositoryImpl$MIN_PERMISSION_SCORE</ID>
    <ID>MultiLineIfElse:PrivacyScoreRepositoryImpl.kt$PrivacyScoreRepositoryImpl$round( FACTOR_OF_PERMISSION_SCORE * ceil((MAX_PERMISSION_SCORE - numberOfPermission) / DIVIDER_OF_PERMISSION_SCORE) ).toInt()</ID>
    <ID>MultiLineIfElse:SearchRepositoryImpl.kt$SearchRepositoryImpl$ResultSupreme.Error( message = "", exception = GPlayIOException("Unable to reach Google Play API") )</ID>
    <ID>MultiLineIfElse:SearchViewModel.kt$SearchViewModel$emptyList()</ID>
    <ID>MultiLineIfElse:SearchViewModel.kt$SearchViewModel$searchRepository.getSearchSuggestions(it)</ID>
    <ID>MultiLineIfElse:SettingsFragment.kt$SettingsFragment$true</ID>
    <ID>MultiLineIfElse:ValidateAppAgeLimitUseCase.kt$ValidateAppAgeLimitUseCase$fetchedContentRating</ID>
    <ID>NoWildcardImports:SystemAppsUpdatesRepository.kt$import foundation.e.apps.data.gitlab.UpdatableSystemAppsApi.*</ID>
    <ID>PrintStackTrace:AppPrivacyInfoRepositoryImpl.kt$AppPrivacyInfoRepositoryImpl$e</ID>
    <ID>PrintStackTrace:CommonUtilsModule.kt$CommonUtilsModule$e</ID>
+12 −10
Original line number Diff line number Diff line
@@ -263,9 +263,11 @@ class SearchRepositoryImpl @Inject constructor(

        return if (result.isSuccess()) {
            ResultSupreme.Success(result.data as Pair<List<Application>, Boolean>)
        } else ResultSupreme.Error(
        } else {
            ResultSupreme.Error(
                message = "",
                exception = GPlayIOException("Unable to reach Google Play API")
            )
        }
    }
}
+12 −10
Original line number Diff line number Diff line
@@ -132,9 +132,11 @@ object CategoryUtils {
    }

    fun getCategoryIconName(category: Category): String {
        var categoryTitle =
            if (category.tag.getOperationalTag().contentEquals(AppTag.GPlay().getOperationalTag()))
                category.id else category.title
        var categoryTitle = if (category.tag.getOperationalTag().contentEquals(AppTag.GPlay().getOperationalTag())) {
            category.id
        } else {
            category.title
        }

        if (categoryTitle.contains(CATEGORY_TITLE_REPLACEABLE_CONJUNCTION)) {
            categoryTitle = categoryTitle.replace(
+5 −4
Original line number Diff line number Diff line
@@ -41,11 +41,12 @@ fun App.toApplication(context: Context): Application {
        other_images_path = this.screenshots.toList().map { it.url },
        package_name = this.packageName,
        ratings = Ratings(
            usageQualityScore =
            this.labeledRating.run {
            usageQualityScore = this.labeledRating.run {
                if (isNotEmpty()) {
                    this.replace(",", ".").toDoubleOrNull() ?: -1.0
                } else -1.0
                    replace(",", ".").toDoubleOrNull() ?: -1.0
                } else {
                    -1.0
                }
            }
        ),
        offer_type = this.offerType,
+5 −2
Original line number Diff line number Diff line
@@ -35,7 +35,10 @@ sealed class AppTag(val displayTag: String) {
     * This method allows for all those check to work without modification.
     */
    fun getOperationalTag(): String {
        return if (this is OpenSource) "Open Source"
        else this::class.java.simpleName
        return if (this is OpenSource) {
            "Open Source"
        } else {
            this::class.java.simpleName
        }
    }
}
Loading