Addchild key when parent adding child
Logging-out user when success is 4 for session expired WebView for Terms and conditions and privacy policy DisclaimerActivity and showing static content Notification count view and showing count from user data MoreActivity - Song api integration and showing songs
This commit is contained in:
@@ -78,7 +78,7 @@ class SelectAvatarFragment : Fragment() {
|
||||
|
||||
val registerRequestData = with(viewModel){
|
||||
RegisterRequestData(
|
||||
add_child = "0",
|
||||
add_child = if (viewModel.addChildIntent) "1" else "0",
|
||||
avtar = adapter?.avatarList?.get(selectedAvatarPos!!)?.avatar_name,
|
||||
birthdate = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(selectedDOB.time),
|
||||
email = email,
|
||||
|
||||
@@ -132,6 +132,7 @@ class SignUpFragment : Fragment() {
|
||||
passwordTitle.text = getString(R.string.password)
|
||||
|
||||
viewModel.email = email
|
||||
viewModel.addChildIntent = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,9 +95,13 @@ class SplashFragment : Fragment(), Observer<ApiResult<UserDataResponse>?> {
|
||||
if (userPrefs?.userType == UserType.NONE){
|
||||
// none of the user is logged in
|
||||
// going through normal onboard process
|
||||
val extras = FragmentNavigatorExtras(binding.logo to "logo")
|
||||
findNavController().navigate(R.id.action_splashFragment_to_languageFragment,
|
||||
null, null, extras)
|
||||
try {
|
||||
val extras = FragmentNavigatorExtras(binding.logo to "logo")
|
||||
findNavController().navigate(R.id.action_splashFragment_to_languageFragment,
|
||||
null, null, extras)
|
||||
} catch (e: Exception) {
|
||||
// do nothing
|
||||
}
|
||||
}else{
|
||||
// going to home activity as any of the user is logged in
|
||||
activity?.let {
|
||||
|
||||
@@ -36,6 +36,8 @@ class OnboardViewModel: ViewModel(){
|
||||
var name: String? = null
|
||||
var password: String? = null
|
||||
|
||||
var addChildIntent: Boolean = false
|
||||
|
||||
var childList: List<Child>? = null
|
||||
val interestTopics = mutableSetOf<Int>()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user