Skip to content

Commit 7f18cc1

Browse files
committed
Code refactor
1 parent 3e918e9 commit 7f18cc1

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

shared/src/commonMain/kotlin/com.jettaskboard.multiplatform/domain/usecase/GetRandomPhotoListUseCase.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import com.jettaskboard.multiplatform.domain.model.ChangeBackgroundPhotoModel
55
import com.jettaskboard.multiplatform.domain.repo.PhotoRepo
66
import com.jettaskboard.multiplatform.util.Result
77

8-
class GetRandomPhotoListUseCase constructor(
8+
class GetRandomPhotoListUseCase(
99
private val photoRepo: PhotoRepo
1010
) : UseCase<Result<List<ChangeBackgroundPhotoModel>>, Int> {
1111
suspend operator fun invoke(collectionId: Int) =

shared/src/commonMain/kotlin/com.jettaskboard.multiplatform/domain/usecase/SearchPhotoListUseCase.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import com.jettaskboard.multiplatform.domain.model.ChangeBackgroundPhotoModel
55
import com.jettaskboard.multiplatform.domain.repo.PhotoRepo
66
import com.jettaskboard.multiplatform.util.Result
77

8-
class SearchPhotoListUseCase constructor(
8+
class SearchPhotoListUseCase(
99
private val photoRepo: PhotoRepo
1010
) : UseCase<ChangeBackgroundPhotoModel, String> {
1111

shared/src/commonMain/kotlin/com.jettaskboard.multiplatform/ui/RootComponent.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ fun RootComponent(
7272

7373
@Parcelize
7474
sealed class RootStateModel : Parcelable {
75-
object Dashboard : RootStateModel()
76-
object TaskBoard : RootStateModel()
77-
object ChangeBackground : RootStateModel()
75+
data object Dashboard : RootStateModel()
76+
data object TaskBoard : RootStateModel()
77+
data object ChangeBackground : RootStateModel()
7878

79-
object CardDetails: RootStateModel()
79+
data object CardDetails: RootStateModel()
8080
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.jettaskboard.multiplatform.ui.util
22

33
sealed class UIState<out T> {
4-
object Empty : UIState<Nothing>()
5-
object Loading : UIState<Nothing>()
4+
data object Empty : UIState<Nothing>()
5+
data object Loading : UIState<Nothing>()
66
class Success<T>(val data: T) : UIState<T>()
77
class Failure(val throwable: Throwable) : UIState<Nothing>()
88
}

0 commit comments

Comments
 (0)