mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 18:35:40 +03:00
locking the analytics opt in screen to portrait for phones
This commit is contained in:
parent
ce7a93bcae
commit
6f8533c7d6
1 changed files with 5 additions and 0 deletions
|
@ -20,8 +20,10 @@ import com.airbnb.mvrx.viewModel
|
|||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.core.extensions.addFragment
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.ScreenOrientationLocker
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
import im.vector.app.databinding.ActivitySimpleBinding
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
* Simple container for AnalyticsOptInFragment
|
||||
|
@ -29,6 +31,8 @@ import im.vector.app.databinding.ActivitySimpleBinding
|
|||
@AndroidEntryPoint
|
||||
class AnalyticsOptInActivity : VectorBaseActivity<ActivitySimpleBinding>() {
|
||||
|
||||
@Inject lateinit var orientationLocker: ScreenOrientationLocker
|
||||
|
||||
private val viewModel: AnalyticsConsentViewModel by viewModel()
|
||||
|
||||
override fun getBinding() = ActivitySimpleBinding.inflate(layoutInflater)
|
||||
|
@ -36,6 +40,7 @@ class AnalyticsOptInActivity : VectorBaseActivity<ActivitySimpleBinding>() {
|
|||
override fun getCoordinatorLayout() = views.coordinatorLayout
|
||||
|
||||
override fun initUiAndData() {
|
||||
orientationLocker.lockPhonesToPortrait(this)
|
||||
if (isFirstCreation()) {
|
||||
addFragment(views.simpleFragmentContainer, AnalyticsOptInFragment::class.java)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue