Skip to content

Commit

Permalink
#178 [chore] klint 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
murjune committed Aug 11, 2022
1 parent 6402b5b commit f9d17dc
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class NewRulesViewModel @Inject constructor(
val uiState = _uiState.asStateFlow()
val buttonState: StateFlow<Boolean> = 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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ class RulesViewModel @Inject constructor(
_tmpManagerList.value = it.homies
_tmpTodayToDoPosition.value = position
}

}
}

Expand All @@ -125,7 +124,6 @@ class RulesViewModel @Inject constructor(
}
}


/** get
* My -To - DO 서버통신*/
fun fetchToMyTodayToDoList() {
Expand Down Expand Up @@ -204,5 +202,4 @@ class RulesViewModel @Inject constructor(
tmpCategoryOfRuleList[position].isChecked = true
_categoryOfRuleList.value = tmpCategoryOfRuleList.toList()
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ class TimberDebugTree : Timber.DebugTree() {
override fun createStackElementTag(element: StackTraceElement): String? {
return "${element.fileName} : ${element.lineNumber} - ${element.methodName}"
}
}
}
1 change: 0 additions & 1 deletion data/src/main/java/com/hous/data/api/HomeApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ data class TempManagerResponse(
@SerializedName("_id")
val id: String = "",
val homies: List<Homie> = emptyList()
)
)
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -37,7 +34,6 @@ class RulesTodayRepositoryImpl @Inject constructor(

override suspend fun getMyTodoInfoList(roomId: String): List<RuleInfo>? {
return remoteRulesTodayDataSource.getMyToDoInfoList(roomId)

}

override suspend fun putMyToDoCheckLust(
Expand Down
Original file line number Diff line number Diff line change
@@ -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?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -51,7 +52,6 @@ class RemoteRulesTodayDataSourceImpl @Inject constructor(
}
)


override suspend fun putTempManagerInfoList(
roomId: String,
ruleId: String,
Expand All @@ -65,9 +65,9 @@ class RemoteRulesTodayDataSourceImpl @Inject constructor(
)
}.fold(
{}, {
Timber.e(it.message)
null
}
Timber.e(it.message)
null
}
)
}

Expand Down

0 comments on commit f9d17dc

Please sign in to comment.