mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 01:15:54 +03:00
Merge pull request #6293 from vector-im/feature/adm/ftue-tweaks
FTUE - Minor tweaks
This commit is contained in:
commit
01c70e165d
5 changed files with 11 additions and 18 deletions
|
@ -58,7 +58,7 @@ class FtueAuthAccountCreatedFragment @Inject constructor(
|
|||
views.personalizeButtonGroup.isVisible = canPersonalize
|
||||
views.takeMeHomeButtonGroup.isVisible = !canPersonalize
|
||||
|
||||
if (!hasPlayedConfetti && !canPersonalize && requireContext().isAnimationEnabled()) {
|
||||
if (!hasPlayedConfetti && requireContext().isAnimationEnabled()) {
|
||||
hasPlayedConfetti = true
|
||||
views.viewKonfetti.isVisible = true
|
||||
views.viewKonfetti.play()
|
||||
|
|
|
@ -20,9 +20,6 @@ import android.os.Bundle
|
|||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.view.isVisible
|
||||
import im.vector.app.core.animations.play
|
||||
import im.vector.app.core.utils.isAnimationEnabled
|
||||
import im.vector.app.databinding.FragmentFtuePersonalizationCompleteBinding
|
||||
import im.vector.app.features.onboarding.OnboardingAction
|
||||
import im.vector.app.features.onboarding.OnboardingViewEvents
|
||||
|
@ -30,8 +27,6 @@ import javax.inject.Inject
|
|||
|
||||
class FtueAuthPersonalizationCompleteFragment @Inject constructor() : AbstractFtueAuthFragment<FragmentFtuePersonalizationCompleteBinding>() {
|
||||
|
||||
private var hasPlayedConfetti = false
|
||||
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentFtuePersonalizationCompleteBinding {
|
||||
return FragmentFtuePersonalizationCompleteBinding.inflate(inflater, container, false)
|
||||
}
|
||||
|
@ -43,12 +38,6 @@ class FtueAuthPersonalizationCompleteFragment @Inject constructor() : AbstractFt
|
|||
|
||||
private fun setupViews() {
|
||||
views.personalizationCompleteCta.debouncedClicks { viewModel.handle(OnboardingAction.PostViewEvent(OnboardingViewEvents.OnTakeMeHome)) }
|
||||
|
||||
if (!hasPlayedConfetti && requireContext().isAnimationEnabled()) {
|
||||
hasPlayedConfetti = true
|
||||
views.viewKonfetti.isVisible = true
|
||||
views.viewKonfetti.play()
|
||||
}
|
||||
}
|
||||
|
||||
override fun resetViewModel() {
|
||||
|
|
|
@ -28,6 +28,7 @@ import androidx.annotation.ColorRes
|
|||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.isVisible
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.getResTintedDrawable
|
||||
import im.vector.app.core.extensions.getTintedDrawable
|
||||
|
@ -57,6 +58,9 @@ class FtueAuthUseCaseFragment @Inject constructor(
|
|||
}
|
||||
|
||||
private fun setupViews() {
|
||||
// Connect to server relies on https://github.com/vector-im/element-android/issues/5782
|
||||
views.useCaseConnectToServerGroup.isVisible = false
|
||||
|
||||
views.useCaseOptionOne.renderUseCase(
|
||||
useCase = FtueUseCase.FRIENDS_FAMILY,
|
||||
label = R.string.ftue_auth_use_case_option_one,
|
||||
|
|
|
@ -153,6 +153,12 @@
|
|||
app:layout_constraintHeight_min="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/useCaseSkip" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/useCaseConnectToServerGroup"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="useCaseFooter,useCaseConnectToServer" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/useCaseFooter"
|
||||
style="@style/Widget.Vector.TextView.Subtitle"
|
||||
|
|
|
@ -106,10 +106,4 @@
|
|||
app:layout_constraintHeight_percent="0.05"
|
||||
app:layout_constraintTop_toBottomOf="@id/personalizationCompleteCta" />
|
||||
|
||||
<im.vector.app.core.ui.views.CompatKonfetti
|
||||
android:id="@+id/viewKonfetti"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
Loading…
Reference in a new issue