-
Notifications
You must be signed in to change notification settings - Fork 701
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor- [:feature:user-profile] Apply & Fix Detekt, Ktlint Rules (#…
…2693) Jira Tasks - [MM-81](https://mifosforge.jira.com/browse/MM-81)
- Loading branch information
Showing
35 changed files
with
451 additions
and
472 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
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
File renamed without changes.
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,23 @@ | ||
/* | ||
* Copyright 2024 Mifos Initiative | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
* | ||
* See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md | ||
*/ | ||
plugins { | ||
alias(libs.plugins.mifos.android.feature) | ||
alias(libs.plugins.mifos.android.library.compose) | ||
alias(libs.plugins.kotlin.parcelize) | ||
} | ||
|
||
|
||
android { | ||
namespace = "org.mifos.mobile.feature.user.profile" | ||
} | ||
|
||
dependencies { | ||
implementation(libs.squareup.okhttp) | ||
} |
File renamed without changes.
File renamed without changes.
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,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright 2024 Mifos Initiative | ||
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. | ||
If a copy of the MPL was not distributed with this file, | ||
You can obtain one at https://mozilla.org/MPL/2.0/. | ||
See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md | ||
--> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
</manifest> |
49 changes: 49 additions & 0 deletions
49
...ile/src/main/java/org/mifos/mobile/feature/user/profile/navigation/UserProfileNavGraph.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,49 @@ | ||
/* | ||
* Copyright 2024 Mifos Initiative | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
* | ||
* See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md | ||
*/ | ||
package org.mifos.mobile.feature.user.profile.navigation | ||
|
||
import androidx.navigation.NavController | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.compose.composable | ||
import androidx.navigation.compose.navigation | ||
import org.mifos.mobile.feature.user.profile.screens.UserProfileScreen | ||
|
||
fun NavController.navigateToUserProfile() { | ||
navigate(UserProfileNavigation.UserProfileBase.route) | ||
} | ||
|
||
fun NavGraphBuilder.userProfileNavGraph( | ||
navigateBack: () -> Unit, | ||
navigateToChangePassword: () -> Unit, | ||
) { | ||
navigation( | ||
startDestination = UserProfileNavigation.UserProfileScreen.route, | ||
route = UserProfileNavigation.UserProfileBase.route, | ||
) { | ||
userProfileRoute( | ||
navigateBack = navigateBack, | ||
navigateToChangePassword = navigateToChangePassword, | ||
) | ||
} | ||
} | ||
|
||
private fun NavGraphBuilder.userProfileRoute( | ||
navigateBack: () -> Unit, | ||
navigateToChangePassword: () -> Unit, | ||
) { | ||
composable( | ||
route = UserProfileNavigation.UserProfileScreen.route, | ||
) { | ||
UserProfileScreen( | ||
navigateBack = navigateBack, | ||
changePassword = navigateToChangePassword, | ||
) | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...e/src/main/java/org/mifos/mobile/feature/user/profile/navigation/UserProfileNavigation.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,18 @@ | ||
/* | ||
* Copyright 2024 Mifos Initiative | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
* | ||
* See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md | ||
*/ | ||
package org.mifos.mobile.feature.user.profile.navigation | ||
|
||
const val USER_PROFILE_NAVIGATION_ROUTE_BASE = "user_profile_base_route" | ||
const val USER_PROFILE_SCREEN_ROUTE = "user_profile_screen_route" | ||
|
||
internal sealed class UserProfileNavigation(val route: String) { | ||
data object UserProfileBase : UserProfileNavigation(route = USER_PROFILE_NAVIGATION_ROUTE_BASE) | ||
data object UserProfileScreen : UserProfileNavigation(route = USER_PROFILE_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
Oops, something went wrong.