forked from openMF/android-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implemented navigation component in checker inbox task module
- Loading branch information
1 parent
e074088
commit 9cdcc3c
Showing
17 changed files
with
85 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...k/checker_inbox/ui/CheckerInboxUiState.kt → ...task/checker_inbox/CheckerInboxUiState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...checker_inbox/ui/CheckerInboxViewModel.kt → ...sk/checker_inbox/CheckerInboxViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...k/dialog/CheckerInboxTasksFilterDialog.kt → ...x_dialog/CheckerInboxTasksFilterDialog.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nbox_task/dialog/CheckerInboxViewModel.kt → ...ker_inbox_dialog/CheckerInboxViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...inbox_tasks/ui/CheckerInboxTasksScreen.kt → ...er_inbox_tasks/CheckerInboxTasksScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nbox_tasks/ui/CheckerInboxTasksUiState.kt → ...r_inbox_tasks/CheckerInboxTasksUiState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ox_tasks/ui/CheckerInboxTasksViewModel.kt → ...inbox_tasks/CheckerInboxTasksViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...c/main/java/com/mifos/feature/checker_inbox_task/navigation/CheckerInboxTaskNavigation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package com.mifos.feature.checker_inbox_task.navigation | ||
|
||
import androidx.navigation.NavController | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.compose.composable | ||
import androidx.navigation.navigation | ||
import com.mifos.feature.checker_inbox_task.checker_inbox.CheckerInboxScreen | ||
import com.mifos.feature.checker_inbox_task.checker_inbox_tasks.CheckerInboxTasksScreen | ||
|
||
fun NavGraphBuilder.checkerInboxTaskGraph( | ||
navController: NavController, | ||
) { | ||
navigation( | ||
startDestination = CheckerInboxTaskScreens.CheckerInboxTaskScreen.route, | ||
route = CheckerInboxTaskScreens.CheckerInboxTaskScreenRoute.route | ||
) { | ||
checkerInboxTaskRoute( | ||
onBackPressed = navController::popBackStack, | ||
checkerInbox = navController::navigateCheckerInbox | ||
) | ||
checkerInboxRoute( | ||
onBackPressed = navController::popBackStack | ||
) | ||
} | ||
} | ||
|
||
fun NavGraphBuilder.checkerInboxTaskRoute( | ||
onBackPressed: () -> Unit, | ||
checkerInbox: () -> Unit | ||
) { | ||
composable( | ||
route = CheckerInboxTaskScreens.CheckerInboxTaskScreen.route | ||
) { | ||
CheckerInboxTasksScreen( | ||
onBackPressed = onBackPressed, | ||
checkerInbox = checkerInbox | ||
) | ||
} | ||
} | ||
|
||
fun NavGraphBuilder.checkerInboxRoute( | ||
onBackPressed: () -> Unit | ||
) { | ||
composable( | ||
route = CheckerInboxTaskScreens.CheckerInboxScreen.route | ||
) { | ||
CheckerInboxScreen( | ||
onBackPressed = onBackPressed | ||
) | ||
} | ||
} | ||
|
||
fun NavController.navigateCheckerInbox() { | ||
navigate(CheckerInboxTaskScreens.CheckerInboxScreen.route) | ||
} |
12 changes: 12 additions & 0 deletions
12
.../src/main/java/com/mifos/feature/checker_inbox_task/navigation/CheckerInboxTaskScreens.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.mifos.feature.checker_inbox_task.navigation | ||
|
||
sealed class CheckerInboxTaskScreens(val route: String) { | ||
|
||
data object CheckerInboxTaskScreenRoute : | ||
CheckerInboxTaskScreens("checker_inbox_task_screen_route") | ||
|
||
data object CheckerInboxTaskScreen : CheckerInboxTaskScreens("checker_inbox_task_screen") | ||
|
||
data object CheckerInboxScreen : CheckerInboxTaskScreens("checker_inbox_screen") | ||
|
||
} |
26 changes: 0 additions & 26 deletions
26
.../main/java/com/mifos/feature/checker_inbox_task/navigation/CheckerInboxTasksNavigation.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters