mirror of
https://codeberg.org/timelimit/opentimelimit-android.git
synced 2025-10-05 10:49:29 +02:00
Rename SetCategoryForUnusedApps to SetCategoryForUnassignedApps
This commit is contained in:
parent
bb918eac7a
commit
fe062ecaa0
3 changed files with 5 additions and 5 deletions
|
@ -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 {
|
||||
|
|
|
@ -264,7 +264,7 @@ object LocalDatabaseParentActionDispatcher {
|
|||
|
||||
database.device().updateDeviceEntry(deviceEntry)
|
||||
}
|
||||
is SetCategoryForUnusedApps -> {
|
||||
is SetCategoryForUnassignedApps -> {
|
||||
DatabaseValidation.assertChildExists(database, action.childId)
|
||||
|
||||
if (action.categoryId.isNotEmpty()) {
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue