diff --git a/app/src/main/java/com/hous/hous_aos/ui/newrules/NewRulesViewModel.kt b/app/src/main/java/com/hous/hous_aos/ui/newrules/NewRulesViewModel.kt index 7f9b6dc7..1189293a 100644 --- a/app/src/main/java/com/hous/hous_aos/ui/newrules/NewRulesViewModel.kt +++ b/app/src/main/java/com/hous/hous_aos/ui/newrules/NewRulesViewModel.kt @@ -29,8 +29,8 @@ class NewRulesViewModel @Inject constructor( val uiState = _uiState.asStateFlow() val buttonState: StateFlow = uiState.map { it.ruleName.isNotEmpty() && - it.categoryName.isNotEmpty() && - (uiState.value.checkBoxState == State.SELECT || isDayCheck()) + it.categoryName.isNotEmpty() && + (uiState.value.checkBoxState == State.SELECT || isDayCheck()) } .stateIn(viewModelScope, SharingStarted.WhileSubscribed(3000L), false) diff --git a/app/src/main/java/com/hous/hous_aos/ui/rules/RulesFragment.kt b/app/src/main/java/com/hous/hous_aos/ui/rules/RulesFragment.kt index 60ca43df..7c8ac6c8 100644 --- a/app/src/main/java/com/hous/hous_aos/ui/rules/RulesFragment.kt +++ b/app/src/main/java/com/hous/hous_aos/ui/rules/RulesFragment.kt @@ -10,7 +10,6 @@ import androidx.fragment.app.Fragment import androidx.fragment.app.activityViewModels import androidx.fragment.app.commit import androidx.fragment.app.replace -import com.hous.hous_aos.BuildConfig import com.hous.hous_aos.R import com.hous.hous_aos.databinding.FragmentRulesBinding import com.hous.hous_aos.ui.rules.my_to_do.MyToDoFragment diff --git a/app/src/main/java/com/hous/hous_aos/ui/rules/RulesViewModel.kt b/app/src/main/java/com/hous/hous_aos/ui/rules/RulesViewModel.kt index 0f716d4d..6fc3dc2f 100644 --- a/app/src/main/java/com/hous/hous_aos/ui/rules/RulesViewModel.kt +++ b/app/src/main/java/com/hous/hous_aos/ui/rules/RulesViewModel.kt @@ -114,7 +114,6 @@ class RulesViewModel @Inject constructor( _tmpManagerList.value = it.homies _tmpTodayToDoPosition.value = position } - } } @@ -125,7 +124,6 @@ class RulesViewModel @Inject constructor( } } - /** get * My -To - DO 서버통신*/ fun fetchToMyTodayToDoList() { @@ -204,5 +202,4 @@ class RulesViewModel @Inject constructor( tmpCategoryOfRuleList[position].isChecked = true _categoryOfRuleList.value = tmpCategoryOfRuleList.toList() } - } diff --git a/app/src/main/java/com/hous/hous_aos/util/TimberDebugTree.kt b/app/src/main/java/com/hous/hous_aos/util/TimberDebugTree.kt index ad528d34..b675bdc4 100644 --- a/app/src/main/java/com/hous/hous_aos/util/TimberDebugTree.kt +++ b/app/src/main/java/com/hous/hous_aos/util/TimberDebugTree.kt @@ -9,4 +9,4 @@ class TimberDebugTree : Timber.DebugTree() { override fun createStackElementTag(element: StackTraceElement): String? { return "${element.fileName} : ${element.lineNumber} - ${element.methodName}" } -} \ No newline at end of file +} diff --git a/data/src/main/java/com/hous/data/api/HomeApi.kt b/data/src/main/java/com/hous/data/api/HomeApi.kt index 4657e482..38a1cc7b 100644 --- a/data/src/main/java/com/hous/data/api/HomeApi.kt +++ b/data/src/main/java/com/hous/data/api/HomeApi.kt @@ -13,7 +13,6 @@ import retrofit2.http.POST import retrofit2.http.PUT import retrofit2.http.Path - interface HomeApi { @GET("room/{roomId}/home") suspend fun getHomeList( diff --git a/data/src/main/java/com/hous/data/model/response/TempManagerResponse.kt b/data/src/main/java/com/hous/data/model/response/TempManagerResponse.kt index 50d0e053..9b51706e 100644 --- a/data/src/main/java/com/hous/data/model/response/TempManagerResponse.kt +++ b/data/src/main/java/com/hous/data/model/response/TempManagerResponse.kt @@ -7,4 +7,4 @@ data class TempManagerResponse( @SerializedName("_id") val id: String = "", val homies: List = emptyList() -) \ No newline at end of file +) diff --git a/data/src/main/java/com/hous/data/repository/RulesTodayRepositoryImpl.kt b/data/src/main/java/com/hous/data/repository/RulesTodayRepositoryImpl.kt index 21a92d32..111c1b7a 100644 --- a/data/src/main/java/com/hous/data/repository/RulesTodayRepositoryImpl.kt +++ b/data/src/main/java/com/hous/data/repository/RulesTodayRepositoryImpl.kt @@ -1,10 +1,7 @@ package com.hous.data.repository -import com.hous.data.entity.Rule -import com.hous.data.model.WrapperClass import com.hous.data.model.request.MyToDoCheckRequest import com.hous.data.model.request.TempManagerRequest -import com.hous.data.model.response.RulesTableResponse import com.hous.data.source.remote.RemoteRulesTodayDataSource import com.hous.domain.model.RuleInfo import com.hous.domain.model.TempManagerInfo @@ -37,7 +34,6 @@ class RulesTodayRepositoryImpl @Inject constructor( override suspend fun getMyTodoInfoList(roomId: String): List? { return remoteRulesTodayDataSource.getMyToDoInfoList(roomId) - } override suspend fun putMyToDoCheckLust( diff --git a/data/src/main/java/com/hous/data/source/remote/RemoteRulesTodayDataSource.kt b/data/src/main/java/com/hous/data/source/remote/RemoteRulesTodayDataSource.kt index d531937f..1f2565a2 100644 --- a/data/src/main/java/com/hous/data/source/remote/RemoteRulesTodayDataSource.kt +++ b/data/src/main/java/com/hous/data/source/remote/RemoteRulesTodayDataSource.kt @@ -1,14 +1,11 @@ package com.hous.data.source.remote -import com.hous.data.entity.Rule -import com.hous.data.model.WrapperClass import com.hous.data.model.request.MyToDoCheckRequest -import com.hous.data.model.response.RulesTableResponse import com.hous.data.model.request.TempManagerRequest import com.hous.domain.model.RuleInfo -import com.hous.domain.model.rules.RulesTodayInfo import com.hous.domain.model.TempManagerInfo import com.hous.domain.model.rules.RulesTableInfo +import com.hous.domain.model.rules.RulesTodayInfo interface RemoteRulesTodayDataSource { suspend fun getTodayTodayInfoList(roomId: String): RulesTodayInfo? diff --git a/data/src/main/java/com/hous/data/source/remote/RemoteRulesTodayDataSourceImpl.kt b/data/src/main/java/com/hous/data/source/remote/RemoteRulesTodayDataSourceImpl.kt index c883c87c..8ddba144 100644 --- a/data/src/main/java/com/hous/data/source/remote/RemoteRulesTodayDataSourceImpl.kt +++ b/data/src/main/java/com/hous/data/source/remote/RemoteRulesTodayDataSourceImpl.kt @@ -24,7 +24,8 @@ class RemoteRulesTodayDataSourceImpl @Inject constructor( { response -> return RulesTodayInfo( response.data?.homeRuleCategories!!.map { it.toCategoryInfo() }, - response.data.todayTodoRules.map { it.toRuleInfo() }) + response.data.todayTodoRules.map { it.toRuleInfo() } + ) }, { Timber.e(it.message) @@ -51,7 +52,6 @@ class RemoteRulesTodayDataSourceImpl @Inject constructor( } ) - override suspend fun putTempManagerInfoList( roomId: String, ruleId: String, @@ -65,9 +65,9 @@ class RemoteRulesTodayDataSourceImpl @Inject constructor( ) }.fold( {}, { - Timber.e(it.message) - null - } + Timber.e(it.message) + null + } ) }