Rename SetCategoryForUnusedApps to SetCategoryForUnassignedApps

This commit is contained in:
Jonas L 2019-01-25 07:22:02 +01:00
parent bb918eac7a
commit fe062ecaa0
3 changed files with 5 additions and 5 deletions

View file

@ -126,7 +126,7 @@ data class UpdateCategoryTemporarilyBlockedAction(val categoryId: String, val bl
IdGenerator.assertIdValid(categoryId)
}
}
data class SetCategoryForUnusedApps(val childId: String, val categoryId: String): ParentAction() {
data class SetCategoryForUnassignedApps(val childId: String, val categoryId: String): ParentAction() {
// category id can be empty
init {

View file

@ -264,7 +264,7 @@ object LocalDatabaseParentActionDispatcher {
database.device().updateDeviceEntry(deviceEntry)
}
is SetCategoryForUnusedApps -> {
is SetCategoryForUnassignedApps -> {
DatabaseValidation.assertChildExists(database, action.childId)
if (action.categoryId.isNotEmpty()) {

View file

@ -6,7 +6,7 @@ import io.timelimit.android.data.Database
import io.timelimit.android.databinding.ManageCategoryForUnassignedAppsBinding
import io.timelimit.android.livedata.ignoreUnchanged
import io.timelimit.android.livedata.map
import io.timelimit.android.sync.actions.SetCategoryForUnusedApps
import io.timelimit.android.sync.actions.SetCategoryForUnassignedApps
import io.timelimit.android.ui.main.ActivityViewModel
object ManageCategoryForUnassignedApps {
@ -28,14 +28,14 @@ object ManageCategoryForUnassignedApps {
if (chosen == true) {
auth.tryDispatchParentAction(
SetCategoryForUnusedApps(
SetCategoryForUnassignedApps(
childId = childId,
categoryId = ""
)
)
} else if (chosen == false) {
auth.tryDispatchParentAction(
SetCategoryForUnusedApps(
SetCategoryForUnassignedApps(
childId = childId,
categoryId = categoryId
)