Skip to content

Commit

Permalink
fix: Fix templates when AI is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
levinzonr committed May 21, 2024
1 parent b28562f commit 091e114
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ class ComposeArchDialogViewModel(

private fun generateFiles(breakdown: FeatureBreakdown?) {
val config = repository.get()
println(breakdown)
val properties = FeatureProperties(name, config, breakdown).toProperties()

invokeLater(ModalityState.defaultModalityState()) {
runWriteAction {
val featPackage =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
package ${PACKAGE_NAME}

import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.staticCompositionLocalOf
#if (${USE_PREVIEW_PARAMETER_PROVIDER} == "true")
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
#end

/**
* UI State that represents ${NAME}Screen
**/
#if (!${AI_USED})
#if (!${AI_USED} == "true")
class ${NAME}State
#else
data class ${NAME}State(
Expand All @@ -23,7 +21,7 @@ import androidx.compose.ui.tooling.preview.PreviewParameterProvider
* passed to the coordinator to handle
**/
data class ${NAME}Actions(
#if (${AI_USED})
#if (${AI_USED} == true)
${ACTIONS}
#else
val onClick: () -> Unit = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import javax.inject.Inject
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
#if (${AI_USED})
#if (${AI_USED} == "true")
import kotlinx.coroutines.flow.update
#end

Expand Down

0 comments on commit 091e114

Please sign in to comment.