File tree Expand file tree Collapse file tree
libraries/domain/src/main/java/com/smarttoolfactory/domain/usecase Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,6 +176,9 @@ class GetPropertiesUseCaseFlow @Inject constructor(
176176 }
177177 }
178178
179+ /* *
180+ * Get current sort key from db
181+ */
179182 fun getCurrentSortKey (defaultKey : String = ORDER_BY_NONE ): Flow <String > {
180183 return flow { emit(repository.getSortOrderKey()) }
181184 .catch {
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package com.smarttoolfactory.domain.usecase
22
33import com.smarttoolfactory.data.constant.ORDER_BY_NONE
44import com.smarttoolfactory.data.model.local.PagedPropertyEntity
5+ import com.smarttoolfactory.data.model.local.PropertyEntity
56import com.smarttoolfactory.data.repository.PagedPropertyRepository
67import com.smarttoolfactory.domain.dispatcher.UseCaseDispatchers
78import com.smarttoolfactory.domain.error.EmptyDataException
@@ -76,6 +77,7 @@ class GetPropertiesUseCasePaged @Inject constructor(
7677 }
7778 }
7879
80+
7981 private fun toPropertyListOrError (entityList : List <PagedPropertyEntity >): List <PropertyItem > {
8082 return if (! entityList.isNullOrEmpty()) {
8183 mapper.map(entityList)
@@ -84,6 +86,9 @@ class GetPropertiesUseCasePaged @Inject constructor(
8486 }
8587 }
8688
89+ /* *
90+ * Get current sort key from db
91+ */
8792 fun getCurrentSortKey (defaultKey : String = ORDER_BY_NONE ): Flow <String > {
8893 return flow { emit(repository.getSortOrderKey()) }
8994 .catch {
Original file line number Diff line number Diff line change @@ -121,6 +121,9 @@ class GetPropertiesUseCaseRxJava3 @Inject constructor(
121121 )
122122 }
123123
124+ /* *
125+ * Get current sort key from db
126+ */
124127 fun getCurrentSortKey (defaultKey : String = ORDER_BY_NONE ): Single <String > {
125128 return repository.getSortOrderKey()
126129 .onErrorResumeNext {
You can’t perform that action at this time.
0 commit comments