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.
Merge branch 'master' into nav_graph_path
- Loading branch information
Showing
74 changed files
with
908 additions
and
208 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
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
8 changes: 8 additions & 0 deletions
8
feature/about/src/main/java/com/mifos/feature/about/navigation/AboutScreens.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,8 @@ | ||
package com.mifos.feature.about.navigation | ||
|
||
/** | ||
* Created by Pronay Sarker on 18/08/2024 (2:42 PM) | ||
*/ | ||
sealed class AboutScreens(val route: String) { | ||
data object AboutScreen : AboutScreens(route = "about_screen_route") | ||
} |
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
32 changes: 32 additions & 0 deletions
32
feature/activate/src/main/java/com/mifos/feature/activate/navigation/ActivateNavigation.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,32 @@ | ||
package com.mifos.feature.activate.navigation | ||
|
||
import androidx.navigation.NavController | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.NavType | ||
import androidx.navigation.compose.composable | ||
import androidx.navigation.navArgument | ||
import com.mifos.core.common.utils.Constants | ||
import com.mifos.feature.activate.ActivateScreen | ||
|
||
/** | ||
* Created by Pronay Sarker on 18/08/2024 (1:40 PM) | ||
*/ | ||
fun NavGraphBuilder.activateScreen( | ||
onBackPressed: () -> Unit | ||
) { | ||
composable( | ||
route = ActivateScreens.ActivateScreen.route, | ||
arguments = listOf( | ||
navArgument(name = Constants.ACTIVATE_ID, builder = { NavType.IntType }), | ||
navArgument(name = Constants.ACTIVATE_TYPE, builder = { NavType.StringType }) | ||
) | ||
) { | ||
ActivateScreen( | ||
onBackPressed = onBackPressed | ||
) | ||
} | ||
} | ||
|
||
fun NavController.navigateToActivateScreen(id : Int, type : String){ | ||
navigate(ActivateScreens.ActivateScreen.argument(id, type)) | ||
} |
12 changes: 12 additions & 0 deletions
12
feature/activate/src/main/java/com/mifos/feature/activate/navigation/ActivateScreens.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.activate.navigation | ||
|
||
import com.mifos.core.common.utils.Constants | ||
|
||
/** | ||
* Created by Pronay Sarker on 18/08/2024 (1:40 PM) | ||
*/ | ||
sealed class ActivateScreens(val route: String) { | ||
data object ActivateScreen : ActivateScreens("activate_screen/{${Constants.ACTIVATE_ID}}/{${Constants.ACTIVATE_TYPE}}") { | ||
fun argument(id: Int, type: String) = "activate_screen/$id/$type" | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...re/auth/login/presentation/LoginScreen.kt → ...m/mifos/feature/auth/login/LoginScreen.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
...e/auth/login/presentation/LoginUiState.kt → .../mifos/feature/auth/login/LoginUiState.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
...auth/login/presentation/LoginViewModel.kt → ...ifos/feature/auth/login/LoginViewModel.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
45 changes: 45 additions & 0 deletions
45
feature/auth/src/main/java/com/mifos/feature/auth/navigation/AuthNavigation.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,45 @@ | ||
package com.mifos.feature.auth.navigation | ||
|
||
import androidx.navigation.NavController | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.compose.composable | ||
import androidx.navigation.navigation | ||
import com.mifos.feature.auth.login.LoginScreen | ||
|
||
fun NavGraphBuilder.authNavGraph( | ||
navigateHome: () -> Unit, | ||
navigatePasscode: () -> Unit, | ||
updateServerConfig: () -> Unit | ||
) { | ||
navigation( | ||
startDestination = AuthScreens.LoginScreen.route, | ||
route = AuthScreens.LoginScreenRoute.route | ||
) { | ||
loginRoute( | ||
navigatePasscode = navigatePasscode, | ||
navigateHome = navigateHome, | ||
updateServerConfig = updateServerConfig | ||
) | ||
} | ||
|
||
} | ||
|
||
fun NavGraphBuilder.loginRoute( | ||
navigateHome: () -> Unit, | ||
navigatePasscode: () -> Unit, | ||
updateServerConfig: () -> Unit | ||
) { | ||
composable( | ||
route = AuthScreens.LoginScreen.route | ||
) { | ||
LoginScreen( | ||
homeIntent = navigateHome, | ||
passcodeIntent = navigatePasscode, | ||
onClickToUpdateServerConfig = updateServerConfig | ||
) | ||
} | ||
} | ||
|
||
fun NavController.navigateToLogin() { | ||
navigate(AuthScreens.LoginScreen.route) | ||
} |
9 changes: 9 additions & 0 deletions
9
feature/auth/src/main/java/com/mifos/feature/auth/navigation/AuthScreens.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,9 @@ | ||
package com.mifos.feature.auth.navigation | ||
|
||
sealed class AuthScreens(val route: String) { | ||
|
||
data object LoginScreenRoute : AuthScreens("login_screen_route") | ||
|
||
data object LoginScreen : AuthScreens("login_screen") | ||
|
||
} |
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
Oops, something went wrong.