File tree Expand file tree Collapse file tree
composeApp/src/commonMain/kotlin/com/linuxcommandlibrary/app Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ fun LinuxApp(initialDeeplink: String? = null) {
195195 composable<Route .BasicGroups > { backStackEntry ->
196196 val route = backStackEntry.toRoute<Route .BasicGroups >()
197197 val basicsRepository: BasicsRepository = koinInject()
198- if (basicsRepository.isTextEditor (route.categoryId)) {
198+ if (basicsRepository.usesCardLayout (route.categoryId)) {
199199 val viewModel: BasicEditorViewModel = koinInject { parametersOf(route.categoryId) }
200200 BasicEditorScreen (viewModel = viewModel, onNavigate = onNavigate)
201201 } else {
Original file line number Diff line number Diff line change @@ -73,7 +73,9 @@ class BasicsRepository(private val assetReader: AssetReader) {
7373 null
7474 }
7575
76- fun isTextEditor (categoryId : String ): Boolean = categoryId.endsWith(" texteditor" )
76+ fun usesCardLayout (categoryId : String ): Boolean =
77+ categoryId.endsWith(" texteditor" ) ||
78+ categoryId in setOf (" shellscripting" , " tmux" , " regularexpressions" )
7779
7880 private fun parseCommandLine (line : String ): Pair <String , String > {
7981 val codeContent = line.trim().removeSurrounding(" ```" )
You can’t perform that action at this time.
0 commit comments