Skip to content

Commit

Permalink
[UI/#10] ktlint formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
DongChyeon committed Jan 4, 2025
1 parent 636aa41 commit 8bcd90a
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ fun OrbitCheckBox(
.size(20.dp)
.background(
color = backgroundColor,
shape = RoundedCornerShape(4.dp)
shape = RoundedCornerShape(4.dp),
)
.clip(RoundedCornerShape(4.dp))
.clickable {
onClick(!isSelected)
},
contentAlignment = Alignment.Center
contentAlignment = Alignment.Center,
) {
Icon(
painter = painterResource(core.designsystem.R.drawable.ic_check),
contentDescription = "IC_CHECK",
tint = OrbitTheme.colors.gray_700
tint = OrbitTheme.colors.gray_700,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import com.yapp.designsystem.theme.OrbitTheme
@Composable
fun OrbitRadioButton(
isSelected: Boolean,
onClick: (Boolean) -> Unit
onClick: (Boolean) -> Unit,
) {
val backgroundColor = if (isSelected) {
OrbitTheme.colors.main.copy(alpha = 0.3f)
Expand All @@ -46,21 +46,21 @@ fun OrbitRadioButton(
.size(20.dp)
.background(
color = backgroundColor,
shape = CircleShape
shape = CircleShape,
)
.clip(CircleShape)
.clickable {
onClick(!isSelected)
},
contentAlignment = Alignment.Center
contentAlignment = Alignment.Center,
) {
Spacer(
modifier = Modifier.size(circleSize)
.background(
color = circleColor,
shape = CircleShape
shape = CircleShape,
)
.clip(CircleShape)
.clip(CircleShape),
)
}
}
Expand All @@ -75,7 +75,7 @@ fun OrbitRadioButtonPreview() {
isSelected = isSelected,
onClick = {
isSelected = it
}
},
)
}
}
10 changes: 5 additions & 5 deletions core/ui/src/main/java/com/yapp/ui/component/switch/Switch.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ fun OrbitSwitch(
.size(20.dp)
.background(
color = thumbColor,
shape = CircleShape
)
shape = CircleShape,
),
)
},
colors = SwitchDefaults.colors(
checkedThumbColor = Color.Transparent,
checkedTrackColor = OrbitTheme.colors.main,
uncheckedThumbColor = Color.Transparent,
uncheckedTrackColor = OrbitTheme.colors.gray_600,
uncheckedBorderColor = Color.Transparent
)
uncheckedBorderColor = Color.Transparent,
),
)
}

Expand All @@ -61,7 +61,7 @@ fun OrbitTogglePreview() {
isSelected = isSelected,
onClick = {
isSelected = it
}
},
)
}
}
6 changes: 3 additions & 3 deletions data/src/main/java/com/yapp/data/local/AlarmEntity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ data class AlarmEntity(
val soundUri: String = "",
val soundVolume: Int = 70,

val isAlarmActive: Boolean = true
val isAlarmActive: Boolean = true,
)

fun AlarmEntity.toDomain() = Alarm(
Expand All @@ -46,7 +46,7 @@ fun AlarmEntity.toDomain() = Alarm(
isSoundEnabled = isSoundEnabled,
soundUri = soundUri,
soundVolume = soundVolume,
isAlarmActive = isAlarmActive
isAlarmActive = isAlarmActive,
)

fun Alarm.toEntity() = AlarmEntity(
Expand All @@ -63,5 +63,5 @@ fun Alarm.toEntity() = AlarmEntity(
isSoundEnabled = isSoundEnabled,
soundUri = soundUri,
soundVolume = soundVolume,
isAlarmActive = isAlarmActive
isAlarmActive = isAlarmActive,
)
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AlarmLocalDataSourceImpl @Inject constructor(
) : AlarmLocalDataSource {
override suspend fun getPagedAlarms(
limit: Int,
offset: Int
offset: Int,
): List<Alarm> {
return alarmDao.getAlarms(limit, offset).map {
it.toDomain()
Expand Down
3 changes: 0 additions & 3 deletions data/src/main/java/com/yapp/data/local/di/DataSourceModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ package com.yapp.data.local.di

import com.yapp.data.local.datasource.AlarmLocalDataSource
import com.yapp.data.local.datasource.AlarmLocalDataSourceImpl
import com.yapp.data.remote.datasource.DummyDataSource
import com.yapp.data.remote.datasource.DummyDataSourceImpl
import com.yapp.domain.model.Alarm
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
Expand Down
6 changes: 3 additions & 3 deletions data/src/main/java/com/yapp/data/local/di/DatabaseModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ class DatabaseModule {
@Provides
@Singleton
fun providesAlarmDatabase(
context: Context
context: Context,
): AlarmDatabase {
return Room.databaseBuilder(
context.applicationContext,
AlarmDatabase::class.java,
AlarmDatabase.DATABASE_NAME
AlarmDatabase.DATABASE_NAME,
).build()
}

@Provides
@Singleton
fun providesAlarmDao(
database: AlarmDatabase
database: AlarmDatabase,
): AlarmDao {
return database.alarmDao()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import com.yapp.domain.repository.AlarmRepository
import javax.inject.Inject

class AlarmRepositoryImpl @Inject constructor(
private val alarmLocalDataSource: AlarmLocalDataSource
private val alarmLocalDataSource: AlarmLocalDataSource,
) : AlarmRepository {
override suspend fun getPagedAlarms(limit: Int, offset: Int): Result<List<Alarm>> = runCatching {
alarmLocalDataSource.getPagedAlarms(limit, offset)
Expand Down
2 changes: 1 addition & 1 deletion domain/src/main/java/com/yapp/domain/model/Alarm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ data class Alarm(
val soundUri: String = "",
val soundVolume: Int = 70,

val isAlarmActive: Boolean = true
val isAlarmActive: Boolean = true,
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.yapp.domain.repository.AlarmRepository
import javax.inject.Inject

class AlarmUseCase @Inject constructor(
private val alarmRepository: AlarmRepository
private val alarmRepository: AlarmRepository,
) {
suspend fun getPagedAlarms(limit: Int, offset: Int): Result<List<Alarm>> = alarmRepository.getPagedAlarms(limit, offset)
suspend fun getAlarmCount(): Result<Int> = alarmRepository.getAlarmCount()
Expand Down

0 comments on commit 8bcd90a

Please sign in to comment.