Handle interactive add menu commands
This commit is contained in:
@@ -21,7 +21,14 @@ val RepoStateSaver = listSaver<RepoState, Any>(
|
||||
state.submodules.flatMap { listOf(it.key, it.value) },
|
||||
state.maintenanceActions.toList(),
|
||||
state.fetchHeadCount,
|
||||
state.interactiveAddSession?.let { listOf(it.target.orEmpty(), it.awaitingUpdateSelection.toString()) }.orEmpty(),
|
||||
state.interactiveAddSession?.let {
|
||||
listOf(
|
||||
it.target.orEmpty(),
|
||||
it.awaitingUpdateSelection.toString(),
|
||||
it.selectionPrompt,
|
||||
it.selectionAction,
|
||||
)
|
||||
}.orEmpty(),
|
||||
)
|
||||
},
|
||||
restore = { saved ->
|
||||
@@ -70,6 +77,8 @@ val RepoStateSaver = listSaver<RepoState, Any>(
|
||||
InteractiveAddSession(
|
||||
target = (it[0] as String).ifBlank { null },
|
||||
awaitingUpdateSelection = (it[1] as String).toBoolean(),
|
||||
selectionPrompt = it.getOrNull(2) as? String ?: "Update>>",
|
||||
selectionAction = it.getOrNull(3) as? String ?: "update",
|
||||
)
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user