Skip to content

Commit

Permalink
Merge branch 'develop' into fix/reissue_api_exception
Browse files Browse the repository at this point in the history
  • Loading branch information
kez-lab authored Jan 30, 2025
2 parents 349bded + 4600bc4 commit 87082ac
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 152 deletions.
2 changes: 2 additions & 0 deletions app/src/main/java/com/hmh/hamyeonham/HMHApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.app.Application
import androidx.hilt.work.HiltWorkerFactory
import androidx.work.Configuration
import com.amplitude.api.Amplitude
import com.google.firebase.crashlytics.FirebaseCrashlytics
import com.hmh.hamyeonham.core.notification.AppNotificationManager
import com.hmh.hamyeonham.hus.usagestats.HMHUsageStatsManager
import com.kakao.sdk.common.KakaoSdk
Expand Down Expand Up @@ -35,6 +36,7 @@ class HMHApplication : Application(), Configuration.Provider {

setAmplitude()

FirebaseCrashlytics.getInstance().isCrashlyticsCollectionEnabled = !BuildConfig.DEBUG
KakaoSdk.init(this, BuildConfig.KAKAO_API_KEY)
HMHUsageStatsManager.init(this)
notificationManager.setupNotificationChannel()
Expand Down
11 changes: 0 additions & 11 deletions app/src/main/java/com/hmh/hamyeonham/ui/theme/Color.kt

This file was deleted.

70 changes: 0 additions & 70 deletions app/src/main/java/com/hmh/hamyeonham/ui/theme/Theme.kt

This file was deleted.

34 changes: 0 additions & 34 deletions app/src/main/java/com/hmh/hamyeonham/ui/theme/Type.kt

This file was deleted.

1 change: 1 addition & 0 deletions core/designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
plugins {
hmh("feature")
hmh("compose")
}

android {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.hmh.hamyeonham.feature.lock.ui.theme
package com.hmh.hamyeonham.core.designsystem.ui.theme

import androidx.compose.ui.graphics.Color

Expand Down
Original file line number Diff line number Diff line change
@@ -1,53 +1,55 @@
package com.hmh.hamyeonham.feature.lock.ui.theme
package com.hmh.hamyeonham.core.designsystem.ui.theme

import android.app.Activity
import android.os.Build
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme
import androidx.compose.material3.dynamicDarkColorScheme
import androidx.compose.material3.dynamicLightColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.SideEffect
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalInspectionMode
import androidx.compose.ui.platform.LocalView
import androidx.core.view.WindowCompat

private val DarkColorScheme = darkColorScheme(
primary = Gray7,
secondary = Gray8,
tertiary = WhiteBtn
onPrimary = WhiteBtn,
primaryContainer = Gray8,
secondary = Gray3,
onSecondary = WhiteText,
secondaryContainer = Gray4,
onSecondaryContainer = Gray2,
background = Blackground,
onBackground = WhiteText
)


private val LightColorScheme = lightColorScheme(
primary = Gray7,
secondary = Gray8,
tertiary = WhiteBtn
onPrimary = WhiteBtn,
primaryContainer = Gray8,
secondary = Gray3,
onSecondary = WhiteText,
secondaryContainer = Gray4,
onSecondaryContainer = Gray2,
background = Blackground,
onBackground = WhiteText
)

@Composable
fun HMHAndroidTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
dynamicColor: Boolean = true,
content: @Composable () -> Unit
) {
val colorScheme = when {
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
val context = LocalContext.current
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
}
val colorScheme = if (darkTheme) DarkColorScheme else LightColorScheme

darkTheme -> DarkColorScheme
else -> LightColorScheme
}
val view = LocalView.current
if (!view.isInEditMode) {
if (!LocalInspectionMode.current) {
val view = LocalView.current
SideEffect {
val window = (view.context as Activity).window
window.statusBarColor = colorScheme.primary.toArgb()
WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme
WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !darkTheme
WindowCompat.getInsetsController(window, view).isAppearanceLightNavigationBars =
!darkTheme
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
package com.hmh.hamyeonham.feature.lock.ui.theme
package com.hmh.hamyeonham.core.designsystem.ui.theme

import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp
import com.hmh.hamyeonham.core.designsystem.R

val PretendardMedium = FontFamily(
Font(
com.hmh.hamyeonham.core.designsystem.R.font.pretendard_medium,
R.font.pretendard_medium,
FontWeight.Medium
)
)
val PretendardRegular = FontFamily(
Font(
com.hmh.hamyeonham.core.designsystem.R.font.pretendard_regular,
R.font.pretendard_regular,
FontWeight.Normal
)
)
val PretendardSemiBold = FontFamily(
Font(
com.hmh.hamyeonham.core.designsystem.R.font.pretendard_semibold,
R.font.pretendard_semibold,
FontWeight.SemiBold
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import com.hmh.hamyeonham.common.app.killAppByPackageName
import com.hmh.hamyeonham.common.navigation.NavigationProvider
import com.hmh.hamyeonham.feature.lock.ui.theme.HMHAndroidTheme
import com.hmh.hamyeonham.core.designsystem.ui.theme.HMHAndroidTheme
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ import androidx.compose.ui.unit.dp
import coil.compose.AsyncImage
import com.hmh.hamyeonham.common.amplitude.AmplitudeUtils
import com.hmh.hamyeonham.common.context.getAppNameFromPackageName
import com.hmh.hamyeonham.feature.lock.ui.theme.Blackground
import com.hmh.hamyeonham.feature.lock.ui.theme.BluePurpleButton
import com.hmh.hamyeonham.feature.lock.ui.theme.Gray1
import com.hmh.hamyeonham.feature.lock.ui.theme.Gray2
import com.hmh.hamyeonham.feature.lock.ui.theme.Gray3
import com.hmh.hamyeonham.feature.lock.ui.theme.HmhTypography
import com.hmh.hamyeonham.feature.lock.ui.theme.WhiteBtn
import com.hmh.hamyeonham.feature.lock.ui.theme.WhiteText
import com.hmh.hamyeonham.core.designsystem.ui.theme.Blackground
import com.hmh.hamyeonham.core.designsystem.ui.theme.BluePurpleButton
import com.hmh.hamyeonham.core.designsystem.ui.theme.Gray1
import com.hmh.hamyeonham.core.designsystem.ui.theme.Gray2
import com.hmh.hamyeonham.core.designsystem.ui.theme.Gray3
import com.hmh.hamyeonham.core.designsystem.ui.theme.HmhTypography
import com.hmh.hamyeonham.core.designsystem.ui.theme.WhiteBtn
import com.hmh.hamyeonham.core.designsystem.ui.theme.WhiteText

@Composable
fun LockScreen(
Expand Down

0 comments on commit 87082ac

Please sign in to comment.