Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import androidx.activity.result.contract.ActivityResultContracts
import androidx.core.content.edit
import androidx.core.os.BundleCompat
import com.ichi2.anki.account.AccountActivity
import com.ichi2.anki.account.LoginFragment
import com.ichi2.anki.common.annotations.NeedsTest
import com.ichi2.anki.introduction.SetupCollectionFragment
import com.ichi2.anki.introduction.SetupCollectionFragment.CollectionSetupOption
Expand All @@ -37,13 +38,13 @@ import timber.log.Timber
/**
* App introduction for new users.
*
* Links to [LoginActivity] ("Sync from AnkiWeb") or [DeckPicker] ("Get Started")
* Links to [AccountActivity]/[LoginFragment] ("Sync from AnkiWeb") or [DeckPicker] ("Get Started")
*
* @see SetupCollectionFragment
*/
// TODO: Background of introduction_layout does not display on API 25 emulator: https://github.com/ankidroid/Anki-Android/pull/12033#issuecomment-1228429130
@NeedsTest("Ensure that we can get here on first run without an exception dialog shown")
class IntroductionActivity : AnkiActivity() {
class IntroductionActivity : AnkiActivity(R.layout.introduction_activity) {
@NeedsTest("ensure this is called when the activity ends")
private val onLoginResult =
registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result: ActivityResult ->
Expand All @@ -60,7 +61,6 @@ class IntroductionActivity : AnkiActivity() {
return
}
super.onCreate(savedInstanceState)
setContentView(R.layout.introduction_activity)

setFragmentResultListener(FRAGMENT_KEY) { _, bundle ->
val option =
Expand Down