forked from openMF/mifos-mobile
-
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 pull request #2 from openMF/development
Refactor registration module (openMF#2633)
- Loading branch information
Showing
30 changed files
with
357 additions
and
142 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
33 changes: 25 additions & 8 deletions
33
app/src/main/java/org/mifos/mobile/ui/registration/RegistrationActivity.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 |
---|---|---|
@@ -1,19 +1,36 @@ | ||
package org.mifos.mobile.ui.registration | ||
|
||
import android.content.Intent | ||
import android.os.Bundle | ||
import org.mifos.mobile.R | ||
import org.mifos.mobile.databinding.ActivityRegistrationBinding | ||
import androidx.activity.compose.setContent | ||
import androidx.activity.enableEdgeToEdge | ||
import androidx.navigation.compose.rememberNavController | ||
import org.mifos.mobile.core.ui.theme.MifosMobileTheme | ||
import org.mifos.mobile.feature.registration.navigation.RegistrationNavGraph | ||
import org.mifos.mobile.feature.registration.navigation.RegistrationScreen | ||
import org.mifos.mobile.ui.activities.base.BaseActivity | ||
import org.mifos.mobile.ui.login.LoginActivity | ||
|
||
class RegistrationActivity : BaseActivity() { | ||
|
||
private lateinit var binding: ActivityRegistrationBinding | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
binding = ActivityRegistrationBinding.inflate(layoutInflater) | ||
setContentView(binding.root) | ||
replaceFragment(RegistrationComposeFragment.newInstance(), false, R.id.container) | ||
enableEdgeToEdge() | ||
setContent { | ||
MifosMobileTheme { | ||
val navController = rememberNavController() | ||
RegistrationNavGraph( | ||
startDestination = RegistrationScreen.Registration.route, | ||
navController = navController, | ||
navigateBack = { this.finish() }, | ||
startLoginActivity = { startLoginActivity() } | ||
) | ||
} | ||
} | ||
} | ||
|
||
private fun startLoginActivity() | ||
{ | ||
this.startActivity(Intent(this, LoginActivity::class.java)) | ||
this.finish() | ||
} | ||
} |
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
20 changes: 0 additions & 20 deletions
20
app/src/main/java/org/mifos/mobile/ui/registration/RegistrationFragment.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
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
8 changes: 0 additions & 8 deletions
8
app/src/main/java/org/mifos/mobile/utils/RegistrationUiState.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
Oops, something went wrong.