Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
run detekt
Browse files Browse the repository at this point in the history
  • Loading branch information
matsumo0922 committed Dec 13, 2023
1 parent d5c17bc commit 093d627
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 19 deletions.
2 changes: 2 additions & 0 deletions config/detekt/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ style:

potential-bugs:
active: true
UnsafeCallOnNullableType:
active: false

formatting:
active: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ class BillingClientProviderImpl @Inject constructor(
billingClient.queryPurchaseHistoryAsync(params) { result, purchases ->
when (val response = result.toResponse()) {
is BillingResponse.OK -> {
listener.invoke(Result.success(purchases ?: emptyList()))
listener.invoke(Result.success(purchases.orEmpty()))
}
is BillingResponse.ServiceDisconnected, is BillingResponse.ServiceError -> {
Timber.d("queryPurchaseHistory: service error. CODE=${response.code}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ data class PurchaseSingleCommand(
fun toBillingFlowParams(): BillingFlowParams {
val productDetailParams = ProductDetailsParams.newBuilder()
.setProductDetails(productDetails.rawProductDetails)
.setOfferToken(offerToken ?: "")
.setOfferToken(offerToken.orEmpty())
.build()

val builder = BillingFlowParams.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("InjectDispatcher")

package caios.android.fanbox.core.common.di

import dagger.Module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ import com.google.android.gms.ads.AdLoader
import com.google.android.gms.ads.AdRequest
import com.google.android.gms.ads.nativead.NativeAd
import com.google.android.gms.ads.nativead.NativeAdOptions
import kotlinx.coroutines.CoroutineScope
import timber.log.Timber

/*@SuppressLint("MissingPermission")
@Composable
Expand Down Expand Up @@ -192,7 +190,7 @@ fun NativeAdMediumItem(

adLoader.loadAd(AdRequest.Builder().build())
}
}
},
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import dagger.hilt.android.qualifiers.ApplicationContext
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import timber.log.Timber
import java.time.LocalDateTime
import javax.inject.Inject
import javax.inject.Singleton
Expand Down Expand Up @@ -46,7 +45,7 @@ class NativeAdsPreLoader @Inject constructor(
key = key,
ad = nativeAd,
date = LocalDateTime.now(),
)
),
)

key++
Expand Down Expand Up @@ -110,7 +109,7 @@ class NativeAdsPreLoader @Inject constructor(
fun dummy() = NativeAdsPreLoader(
scope = CoroutineScope(Dispatchers.IO),
context = LocalContext.current,
pixiViewConfig = PixiViewConfig.dummy()
pixiViewConfig = PixiViewConfig.dummy(),
)
}
}
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
package caios.android.fanbox.feature.library.home.items

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.grid.GridCells
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
import androidx.compose.foundation.lazy.grid.rememberLazyGridState
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import androidx.paging.LoadState
import androidx.paging.compose.LazyPagingItems
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
import androidx.compose.foundation.lazy.grid.rememberLazyGridState
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.paging.LoadState
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ import caios.android.fanbox.feature.post.detail.items.PostDetailMenuDialog
import coil.compose.SubcomposeAsyncImage
import coil.request.ImageRequest
import kotlinx.collections.immutable.toImmutableList
import kotlinx.coroutines.CoroutineScope
import java.time.format.DateTimeFormatter

@OptIn(ExperimentalFoundationApi::class)
Expand Down
10 changes: 5 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ kotlinCompiler = "1.5.3"
kotlinxCoroutines = "1.7.3"
kotlinxDatetime = "0.4.0"
kotlinxSerializationJson = "1.6.0"
kotlinxImmutable = "0.3.5"
kotlinxImmutable = "0.3.6"

# AndroidX
androidxCore = "1.12.0"
Expand Down Expand Up @@ -66,11 +66,11 @@ protobufPlugin = "0.9.4"
billing = "6.1.0"

# Others
dagger = "2.48"
dagger = "2.49"
ktor = "2.3.4"
coil = "2.4.0"
coil = "2.5.0"
jsoup = "1.16.1"
detekt = "1.23.3"
detekt = "1.23.4"
balloon = "1.5.3"
zoomable = "1.5.2"
pinchZoomGrid = "0.0.4"
Expand All @@ -83,7 +83,7 @@ twitterComposeRule = "0.0.26"
# Debugs
firebase = "32.6.0"
leakCanary = "2.12"
flipper = "0.201.0"
flipper = "0.240.0"
timber = "5.0.1"
junit = "4.13.2"
runner = "1.0.2"
Expand Down

0 comments on commit 093d627

Please sign in to comment.