Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions .idea/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/AndroidProjectSystem.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/compiler.xml

This file was deleted.

18 changes: 0 additions & 18 deletions .idea/deploymentTargetSelector.xml

This file was deleted.

27 changes: 0 additions & 27 deletions .idea/gradle.xml

This file was deleted.

61 changes: 0 additions & 61 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/migrations.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/misc.xml

This file was deleted.

17 changes: 0 additions & 17 deletions .idea/runConfigurations.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/studiobot.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

4 changes: 3 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ android {
}

dependencies {

// Modules
implementation(project(":feature:flow"))
// Módulos propios
implementation(project(":feature:calendar"))
implementation(project(":feature:habits"))
implementation(project(":core:data"))
implementation(project(":core:domain"))
implementation(project(":core:designsystem"))
Expand Down
19 changes: 14 additions & 5 deletions app/src/main/java/com/markel/flowstate/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import androidx.compose.animation.ExperimentalSharedTransitionApi
import androidx.compose.animation.SharedTransitionLayout
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.*
import androidx.compose.runtime.*
Expand All @@ -25,19 +24,18 @@ import androidx.navigation.compose.currentBackStackEntryAsState
import androidx.navigation.compose.rememberNavController
import com.markel.flowstate.components.FlowBottomBar
import com.markel.flowstate.components.PlaceholderScreen
import com.markel.flowstate.feature.flow.tasks.TaskScreen
import com.markel.flowstate.feature.flow.tasks.TaskViewModel
import com.markel.flowstate.core.designsystem.theme.FlowStateTheme
import com.markel.flowstate.core.designsystem.ui.LocalAnimatedVisibilityScope
import com.markel.flowstate.core.designsystem.ui.LocalSharedTransitionScope
import com.markel.flowstate.feature.calendar.CalendarScreen
import com.markel.flowstate.feature.calendar.CalendarViewModel
import com.markel.flowstate.feature.flow.FlowScreen
import com.markel.flowstate.feature.flow.FlowViewModel
import com.markel.flowstate.feature.flow.checklists.CheckListEditorScreen
import com.markel.flowstate.feature.flow.ideas.IdeaEditorScreen
import com.markel.flowstate.feature.flow.tasks.components.TaskEditorScreen
import com.markel.flowstate.feature.flow.tasks.util.HandleSystemBars
import com.markel.flowstate.feature.habits.HabitScreen
import com.markel.flowstate.feature.habits.details.HabitDetailScreen
import com.markel.flowstate.navigation.Screen
import dagger.hilt.android.AndroidEntryPoint

Expand Down Expand Up @@ -126,7 +124,11 @@ class MainActivity : ComponentActivity() {
}
composable(Screen.Habits.route) {
// Temporarily a placeholder
PlaceholderScreen(stringResource(com.markel.flowstate.feature.tasks.R.string.habits))
HabitScreen(
onNavigateToDetail = { habitId ->
navController.navigate(Screen.Detail.habitDetail(habitId))
}
)
}
composable(Screen.Mood.route) {
PlaceholderScreen(stringResource(com.markel.flowstate.feature.tasks.R.string.mood))
Expand Down Expand Up @@ -162,6 +164,13 @@ class MainActivity : ComponentActivity() {
)
}
}
composable(Screen.Detail.HABIT_DETAIL) { backStackEntry ->
val habitId = backStackEntry.arguments?.getString("habitId")?.toIntOrNull() ?: return@composable
HabitDetailScreen(
habitId = habitId,
onBack = { navController.popBackStack() }
)
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/com/markel/flowstate/navigation/Screen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ sealed class Screen(val route: String, @StringRes val labelRes: Int, val iconRes
const val TASK_EDITOR = "task_editor/{taskId}"
const val IDEA_EDITOR = "idea_editor/{ideaId}" // ideaId = "new" for creation
const val CHECKLIST_EDITOR = "checklist_editor/{checkListId}"
const val HABIT_DETAIL = "habit_detail/{habitId}"
fun taskEditor(taskId: Int) = "task_editor/$taskId"
fun ideaEditor(ideaId: Int) = "idea_editor/$ideaId"
fun newIdea() = "idea_editor/new"
fun checkListEditor(checkListId: Int?) =
"checklist_editor/${checkListId ?: "new"}"
fun habitDetail(habitId: Int) = "habit_detail/$habitId"
}
}
Loading
Loading