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 15, 2023
1 parent 9f62ce6 commit 82c366a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion app/src/main/java/caios/android/fanbox/ui/PixiViewApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ private fun IdleScreen(
navigationType: PixiViewNavigationType,
modifier: Modifier = Modifier,
) {
val bottomSheetState = rememberModalBottomSheetState(initialValue = ModalBottomSheetValue.Hidden, skipHalfExpanded = true)
val bottomSheetState =
rememberModalBottomSheetState(initialValue = ModalBottomSheetValue.Hidden, skipHalfExpanded = true)
val bottomSheetNavigator = remember { BottomSheetNavigator(bottomSheetState) }

PixiViewNavHost(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class PixiViewPreferencesDataStore(
isGridMode = if (it.hasIsGridMode()) it.isGridMode else false,
isFollowTabDefaultHome = if (it.hasIsFollowTabDefaultHome()) it.isFollowTabDefaultHome else false,
isHideAdultContents = if (it.hasIsHideAdultContents()) it.isHideAdultContents else true,
isOverrideAdultContents = if (it.hasIsOverrideAdultContents()) it.isOverrideAdultContents else false,
isOverrideAdultContents = if (it.hasIsOverrideAdultContents()) it.isOverrideAdultContents else true,
isPlusMode = if (it.hasIsPlusMode()) it.isPlusMode else false,
isAgreedPrivacyPolicy = if (it.hasIsAgreedPrivacyPolicy()) it.isAgreedPrivacyPolicy else false,
isAgreedTermsOfService = if (it.hasIsAgreedTermsOfService()) it.isAgreedTermsOfService else false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ data class CommonPayload(
// アプリケーション VersionName (21.27.0.13 のような文字列)
val applicationVersionName: String,
// タイムゾーン(Asia/Tokyoなど)
val timeZone: String
val timeZone: String,
) {
fun applyToJsonObject(jsonLog: JSONObject) = jsonLog.apply {
put("pixiview_id", pixiviewId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import kotlinx.serialization.json.put
// This class is automatically generated by generate-log-classes.
sealed class NavigationLog : LogCategory {
class Navigate internal constructor(
private val screenRoute: String
private val screenRoute: String,
) : NavigationLog() {
override val properties: JsonObject = buildJsonObject {
put("event_category", "navigation")
Expand All @@ -19,7 +19,7 @@ sealed class NavigationLog : LogCategory {
companion object {
// 画面遷移したときのログ
fun navigate(
screenRoute: String
screenRoute: String,
) = Navigate(screenRoute)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PixiViewLogFilter(
applicationVariant = BuildConfig.BUILD_TYPE,
applicationVersionCode = pixiViewConfig.versionCode.toLong(),
applicationVersionName = pixiViewConfig.versionName,
timeZone = ZoneId.systemDefault().id
timeZone = ZoneId.systemDefault().id,
)

return commonPayload.applyToJsonObject(log)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.json.JSONObject
import timber.log.Timber
import java.time.Duration

class PixiViewLogOutput: PureeBufferedOutput("pixiview_activity_log") {
class PixiViewLogOutput : PureeBufferedOutput("pixiview_activity_log") {

override val flushInterval: Duration = Duration.ofSeconds(15)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ object PureeConfigurator {
return PureeLogger.Builder(
lifecycle = ProcessLifecycleOwner.get().lifecycle,
logSerializer = PureeKotlinSerializer(formatter),
logStore = DbPureeLogStore(context, "puree-kotlin.db")
logStore = DbPureeLogStore(context, "puree-kotlin.db"),
)
.filter(
PixiViewLogFilter(pixiViewConfig, userData, userAgent = "PixiView"),
PixiViewActivityLog::class.java
PixiViewActivityLog::class.java,
)
.output(
PixiViewLogOutput(),
PixiViewActivityLog::class.java
PixiViewActivityLog::class.java,
)
.build()
}
Expand Down

0 comments on commit 82c366a

Please sign in to comment.