Skip to content

Commit 640aa0d

Browse files
committed
Add comment and only remove overScrollMode if API < 31
1 parent b1bec7f commit 640aa0d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Diff for: app/src/main/java/com/infomaniak/mail/ui/login/IntroFragment.kt

+3
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ class IntroFragment : Fragment() {
113113
}
114114
}
115115

116+
/**
117+
* animate is necessary because when the activity is started we want to avoid animating the color change the first time
118+
*/
116119
private fun setUi(themeColor: ThemeColor, position: Int?, animate: Boolean = true) = with(binding) {
117120
updateEachPageUi(themeColor, animate)
118121
if (position == 0) updateFirstPageUi(themeColor, animate)

Diff for: app/src/main/java/com/infomaniak/mail/ui/login/LoginActivity.kt

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ package com.infomaniak.mail.ui.login
2020
import android.content.Context
2121
import android.content.Intent
2222
import android.content.res.ColorStateList
23+
import android.os.Build
2324
import android.os.Bundle
2425
import android.view.View
2526
import androidx.activity.result.contract.ActivityResultContracts.StartActivityForResult
@@ -97,7 +98,10 @@ class LoginActivity : AppCompatActivity() {
9798
signInButton.isInvisible = !showConnectButton
9899
}
99100
})
100-
removeOverScroll()
101+
102+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
103+
removeOverScroll()
104+
}
101105
}
102106

103107
dotsIndicator.attachTo(introViewpager)

0 commit comments

Comments
 (0)