Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalStateException: TabNavigator not initialized #47 #60

Merged
merged 1 commit into from
Oct 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ import androidx.compose.ui.unit.dp
import cafe.adriel.voyager.core.screen.Screen
import cafe.adriel.voyager.navigator.LocalNavigator
import cafe.adriel.voyager.navigator.currentOrThrow
import cafe.adriel.voyager.navigator.tab.LocalTabNavigator
import com.joelkanyi.focusbloom.core.domain.model.Task
import com.joelkanyi.focusbloom.core.presentation.component.BloomTab
import com.joelkanyi.focusbloom.core.presentation.component.BloomTopAppBar
import com.joelkanyi.focusbloom.core.presentation.component.TaskCard
import com.joelkanyi.focusbloom.feature.home.component.TaskOptionsBottomSheet
Expand Down Expand Up @@ -70,7 +68,7 @@ class AllTasksScreen : Screen, KoinComponent {
val selectedTask = screenModel.selectedTask.collectAsState().value
val openBottomSheet = screenModel.openBottomSheet.collectAsState().value
val bottomSheetState = rememberModalBottomSheetState()
val tabNavigator = LocalTabNavigator.current
// val tabNavigator = LocalTabNavigator.current

if (openBottomSheet) {
if (selectedTask != null) {
Expand All @@ -93,7 +91,9 @@ class AllTasksScreen : Screen, KoinComponent {
screenModel.markAsCompleted(it)
},
onClickEditTask = {
tabNavigator.current = BloomTab.AddTaskTab(taskId = it.id)
/*tabNavigator.current = BloomTab.AddTaskTab(
taskId = it.id
)*/
},
task = selectedTask
)
Expand Down
Loading