Skip to content

Commit 994f992

Browse files
authored
Merge pull request #222 from Infomaniak/onboarding
Boarding
2 parents 1a4ecff + 640aa0d commit 994f992

32 files changed

+1339
-105
lines changed

.idea/navEditor.xml

Lines changed: 47 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ dependencies {
5555
// Realm Kotlin - END /!\
5656

5757
implementation 'com.google.android.flexbox:flexbox:3.0.0'
58+
implementation 'com.tbuonomo:dotsindicator:4.3'
5859

5960
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
6061
}

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
</activity>
5959

6060
<activity
61-
android:name=".ui.LoginActivity"
61+
android:name=".ui.login.LoginActivity"
6262
android:exported="false"
6363
android:theme="@style/AppTheme.Login" />
6464

app/src/main/java/com/infomaniak/mail/ui/LaunchActivity.kt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import android.os.Bundle
2222
import androidx.activity.viewModels
2323
import androidx.appcompat.app.AppCompatActivity
2424
import androidx.lifecycle.lifecycleScope
25+
import com.infomaniak.mail.ui.login.LoginActivity
26+
import com.infomaniak.mail.ui.login.LoginActivityArgs
2527
import com.infomaniak.mail.utils.AccountUtils
2628
import com.infomaniak.mail.utils.observeNotNull
2729
import kotlinx.coroutines.Dispatchers
@@ -40,7 +42,10 @@ class LaunchActivity : AppCompatActivity() {
4042
}
4143

4244
private fun loginUser() {
43-
launchActivity(LoginActivity::class.java)
45+
Intent(this, LoginActivity::class.java).apply {
46+
putExtras(LoginActivityArgs(isFirstAccount = true).toBundle())
47+
startActivity(this)
48+
}
4449
}
4550

4651
private suspend fun startApp() {
@@ -49,15 +54,12 @@ class LaunchActivity : AppCompatActivity() {
4954

5055
withContext(Dispatchers.Main) {
5156
MainViewModel.currentMailboxObjectId.observeNotNull(this@LaunchActivity) {
52-
launchActivity(MainActivity::class.java) // TODO: If there is no Internet, the app won't be able to start.
57+
// TODO: If there is no Internet, the app won't be able to start.
58+
startActivity(Intent(this@LaunchActivity, MainActivity::class.java))
5359
}
5460
}
5561
}
5662

57-
private fun launchActivity(destinationClass: Class<out AppCompatActivity>) {
58-
startActivity(Intent(this, destinationClass))
59-
}
60-
6163
override fun onDestroy() {
6264
MainViewModel.currentMailboxObjectId.removeObservers(this)
6365
super.onDestroy()

0 commit comments

Comments
 (0)