-
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 #319 from PermanentOrg/feature/VSP-1476
Login & Security Menu.
- Loading branch information
Showing
30 changed files
with
281 additions
and
110 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
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
51 changes: 51 additions & 0 deletions
51
app/src/main/java/org/permanent/permanent/ui/settings/LoginAndSecurityFragment.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,51 @@ | ||
package org.permanent.permanent.ui.settings | ||
|
||
import android.os.Bundle | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.ui.platform.ComposeView | ||
import androidx.lifecycle.ViewModelProvider | ||
import androidx.navigation.fragment.findNavController | ||
import org.permanent.permanent.R | ||
import org.permanent.permanent.ui.PermanentBaseFragment | ||
import org.permanent.permanent.ui.settings.compose.LoginAndSecurityMenu | ||
import org.permanent.permanent.viewmodels.LoginAndSecurityViewModel | ||
|
||
class LoginAndSecurityFragment : PermanentBaseFragment() { | ||
|
||
private lateinit var viewModel: LoginAndSecurityViewModel | ||
|
||
override fun onCreateView( | ||
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? | ||
): View { | ||
viewModel = ViewModelProvider(this)[LoginAndSecurityViewModel::class.java] | ||
|
||
return ComposeView(requireContext()).apply { | ||
setContent { | ||
MaterialTheme { | ||
LoginAndSecurityMenu(viewModel, | ||
onChangePasswordClick = { findNavController().navigate(R.id.action_loginAndSecurityFragment_to_changePasswordFragment) } | ||
) { findNavController().navigate(R.id.action_loginAndSecurityFragment_to_twoStepVerificationFragment) } | ||
} | ||
} | ||
} | ||
} | ||
|
||
override fun connectViewModelEvents() { | ||
} | ||
|
||
override fun disconnectViewModelEvents() { | ||
} | ||
|
||
override fun onResume() { | ||
super.onResume() | ||
connectViewModelEvents() | ||
} | ||
|
||
override fun onPause() { | ||
super.onPause() | ||
disconnectViewModelEvents() | ||
} | ||
} |
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.