Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #4833, #4834, #4835, #4838, #1050, #4519, #4522, #4837, #4836, #4855, #4856: Assorted alpha MR6 fixes #4846

Merged
merged 45 commits into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b39e47d
SW translation fixes + better UI.
BenHenning Jun 16, 2022
f2cbc0d
Expand concept card support.
BenHenning Aug 24, 2022
2e62688
Merge branch 'develop' into expand-concept-card-support
BenHenning Aug 24, 2022
76d38ed
Lint fixes.
BenHenning Aug 24, 2022
94a4140
Revert flag enabled for development.
BenHenning Aug 25, 2022
7322714
Merge branch 'develop' into assorted-alpha-mr6-fixes
BenHenning Jan 12, 2023
19f0e69
Fixes a few things for the upcoming MR6 release.
BenHenning Jan 12, 2023
17efba6
Merge branch 'expand-concept-card-support' into assorted-alpha-mr6-fixes
BenHenning Jan 12, 2023
b58c798
Add mark chapter supported for admins.
BenHenning Jan 13, 2023
a502725
Fix in-lesson language switching.
BenHenning Jan 14, 2023
50615ab
Add support for multiple solution types.
BenHenning Jan 18, 2023
970dfaf
Lint & static check fixes.
BenHenning Jan 19, 2023
a3efa90
Remove TODO for soon-to-be-fixed issue.
BenHenning Jan 19, 2023
1d0c122
Merge branch 'develop' into assorted-alpha-mr6-fixes
BenHenning Jan 19, 2023
20255ec
Multiple fixes.
BenHenning Jan 19, 2023
62a3ab3
Fix broken titles in subtopics after conversion.
BenHenning Jan 19, 2023
3a2dee0
Catalog tests to add.
BenHenning Jan 19, 2023
c40d89b
Fix test build breakages.
BenHenning Jan 19, 2023
87cd106
Fix test functional breakages.
BenHenning Jan 19, 2023
598a00c
Add new tests.
BenHenning Jan 20, 2023
c109c7c
Fix broken Gradle tests.
BenHenning Jan 20, 2023
51b83f3
Address reviewer comments.
BenHenning Jan 20, 2023
afc3817
Update version.bzl
BenHenning Jan 20, 2023
8065e64
Assorted fixes.
BenHenning Jan 20, 2023
1346329
Merge branch 'develop' into assorted-alpha-mr6-fixes
BenHenning Jan 26, 2023
39dafc0
Many more fixes/changes per feedback.
BenHenning Jan 30, 2023
c0dc1a5
Address reviewer comments.
BenHenning Jan 30, 2023
a1a33d4
Merge branch 'develop' into assorted-alpha-mr6-fixes
BenHenning Jan 30, 2023
5b220b7
Merge branch 'develop' into adjust-version-codes-based-on-flavors
BenHenning Jan 30, 2023
6eaa68c
Use latest commit for versioning, instead.
BenHenning Jan 30, 2023
a64d1a2
Fix broken tests.
BenHenning Jan 30, 2023
c021017
Fix more broken tests.
BenHenning Jan 30, 2023
c64a91d
Merge branch 'develop' into adjust-version-codes-based-on-flavors
BenHenning Jan 31, 2023
c4ad811
Fix broken Gradle tests.
BenHenning Jan 31, 2023
3f12d91
Merge branch 'develop' into assorted-alpha-mr6-fixes
BenHenning Jan 31, 2023
b793d0d
Merge branch 'develop' into assorted-alpha-mr6-fixes
BenHenning Feb 1, 2023
4a6b904
Merge branch 'develop' into adjust-version-codes-based-on-flavors
BenHenning Feb 1, 2023
c8eb925
Merge branch 'develop' into adjust-version-codes-based-on-flavors
BenHenning Feb 28, 2023
a8f24c3
Update versions for a Kenya alpha re-release.
BenHenning Feb 28, 2023
4539b0a
Merge branch 'adjust-version-codes-based-on-flavors' into assorted-al…
BenHenning Feb 28, 2023
8cd35d9
Merge branch 'assorted-alpha-mr6-fixes' of github.com:oppia/oppia-and…
BenHenning Mar 1, 2023
e49a622
Merge branch 'develop' into adjust-version-codes-based-on-flavors
BenHenning Mar 10, 2023
ca3250e
Merge branch 'adjust-version-codes-based-on-flavors' into assorted-al…
BenHenning Mar 10, 2023
3a8d645
Test fixes following develop update.
BenHenning Mar 10, 2023
245d48a
Merge branch 'develop' into assorted-alpha-mr6-fixes
BenHenning Mar 10, 2023
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
5 changes: 3 additions & 2 deletions app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ VIEW_MODELS_WITH_RESOURCE_IMPORTS = [
"src/main/java/org/oppia/android/app/help/thirdparty/LicenseListViewModel.kt",
"src/main/java/org/oppia/android/app/help/thirdparty/LicenseTextViewModel.kt",
"src/main/java/org/oppia/android/app/help/thirdparty/ThirdPartyDependencyListViewModel.kt",
"src/main/java/org/oppia/android/app/hintsandsolution/HintsViewModel.kt",
"src/main/java/org/oppia/android/app/hintsandsolution/HintsAndSolutionViewModel.kt",
"src/main/java/org/oppia/android/app/hintsandsolution/SolutionViewModel.kt",
"src/main/java/org/oppia/android/app/home/HomeViewModel.kt",
"src/main/java/org/oppia/android/app/home/WelcomeViewModel.kt",
"src/main/java/org/oppia/android/app/home/promotedlist/ComingSoonTopicsViewModel.kt",
Expand Down Expand Up @@ -282,9 +283,9 @@ VIEW_MODELS = [
"src/main/java/org/oppia/android/app/help/HelpItems.kt",
"src/main/java/org/oppia/android/app/help/thirdparty/LicenseItemViewModel.kt",
"src/main/java/org/oppia/android/app/help/thirdparty/ThirdPartyDependencyItemViewModel.kt",
"src/main/java/org/oppia/android/app/hintsandsolution/HintViewModel.kt",
"src/main/java/org/oppia/android/app/hintsandsolution/HintsAndSolutionItemViewModel.kt",
"src/main/java/org/oppia/android/app/hintsandsolution/ReturnToLessonViewModel.kt",
"src/main/java/org/oppia/android/app/hintsandsolution/SolutionViewModel.kt",
"src/main/java/org/oppia/android/app/home/HomeItemViewModel.kt",
"src/main/java/org/oppia/android/app/home/promotedlist/ComingSoonTopicListViewModel.kt",
"src/main/java/org/oppia/android/app/home/recentlyplayed/RecentlyPlayedItemViewModel.kt",
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<!-- NOTE TO DEVELOPER: You can enable debug logs for fast upload & better inspection in Firebase console using https://support.google.com/analytics/answer/7201382. -->
<meta-data
android:name="firebase_analytics_collection_deactivated"
android:value="true" />
android:value="false" />
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
<meta-data
android:name="firebase_crashlytics_collection_enabled"
android:value="false" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ class DeveloperOptionsActivity :

override fun routeToMarkChaptersCompleted() {
startActivity(
MarkChaptersCompletedActivity
.createMarkChaptersCompletedIntent(this, internalProfileId)
MarkChaptersCompletedActivity.createMarkChaptersCompletedIntent(
context = this, internalProfileId, showConfirmationNotice = false
)
)
}

Expand Down Expand Up @@ -86,10 +87,6 @@ class DeveloperOptionsActivity :
decorateWithScreenName(DEVELOPER_OPTIONS_ACTIVITY)
}
}

fun getIntentKey(): String {
return NAVIGATION_PROFILE_ID_ARGUMENT_KEY
}
}

override fun forceCrash() {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ class MarkChaptersCompletedActivity : InjectableAppCompatActivity() {
@Inject
lateinit var resourceHandler: AppLanguageResourceHandler

private var internalProfileId = -1

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
(activityComponent as ActivityComponentImpl).inject(this)
internalProfileId = intent.getIntExtra(PROFILE_ID_EXTRA_KEY, -1)
markChaptersCompletedActivityPresenter.handleOnCreate(internalProfileId)
val internalProfileId = intent.getIntExtra(PROFILE_ID_EXTRA_KEY, /* defaultValue= */ -1)
val showConfirmationNotice =
intent.getBooleanExtra(SHOW_CONFIRMATION_NOTICE_EXTRA_KEY, /* defaultValue= */ false)
markChaptersCompletedActivityPresenter.handleOnCreate(internalProfileId, showConfirmationNotice)
title = resourceHandler.getStringInLocale(R.string.mark_chapters_completed_activity_title)
}

Expand All @@ -39,11 +39,18 @@ class MarkChaptersCompletedActivity : InjectableAppCompatActivity() {
}

companion object {
const val PROFILE_ID_EXTRA_KEY = "MarkChaptersCompletedActivity.profile_id"

fun createMarkChaptersCompletedIntent(context: Context, internalProfileId: Int): Intent {
private const val PROFILE_ID_EXTRA_KEY = "MarkChaptersCompletedActivity.profile_id"
private const val SHOW_CONFIRMATION_NOTICE_EXTRA_KEY =
"MarkChaptersCompletedActivity.show_confirmation_notice"

fun createMarkChaptersCompletedIntent(
context: Context,
internalProfileId: Int,
showConfirmationNotice: Boolean
): Intent {
return Intent(context, MarkChaptersCompletedActivity::class.java).apply {
putExtra(PROFILE_ID_EXTRA_KEY, internalProfileId)
putExtra(SHOW_CONFIRMATION_NOTICE_EXTRA_KEY, showConfirmationNotice)
decorateWithScreenName(MARK_CHAPTERS_COMPLETED_ACTIVITY)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ class MarkChaptersCompletedActivityPresenter @Inject constructor(
private val activity: AppCompatActivity
) {

fun handleOnCreate(internalProfileId: Int) {
fun handleOnCreate(internalProfileId: Int, showConfirmationNotice: Boolean) {
activity.supportActionBar?.setDisplayHomeAsUpEnabled(true)
activity.supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_arrow_back_white_24dp)
activity.setContentView(R.layout.mark_chapters_completed_activity)

if (getMarkChaptersCompletedFragment() == null) {
val markChaptersCompletedFragment = MarkChaptersCompletedFragment
.newInstance(internalProfileId)
val markChaptersCompletedFragment =
MarkChaptersCompletedFragment.newInstance(internalProfileId, showConfirmationNotice)
activity.supportFragmentManager.beginTransaction().add(
R.id.mark_chapters_completed_container,
markChaptersCompletedFragment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,23 @@ class MarkChaptersCompletedFragment : InjectableFragment() {
lateinit var markChaptersCompletedFragmentPresenter: MarkChaptersCompletedFragmentPresenter

companion object {
internal const val PROFILE_ID_ARGUMENT_KEY =
"MarkChaptersCompletedFragment.profile_id"

private const val PROFILE_ID_ARGUMENT_KEY = "MarkChaptersCompletedFragment.profile_id"
private const val SHOW_CONFIRMATION_NOTICE_ARGUMENT_KEY =
"MarkChaptersCompletedFragment.show_confirmation_notice"
private const val EXPLORATION_ID_LIST_ARGUMENT_KEY =
"MarkChaptersCompletedFragment.exploration_id_list"
private const val EXPLORATION_TITLE_LIST_ARGUMENT_KEY =
"MarkChaptersCompletedFragment.exploration_title_list"

/** Returns a new [MarkChaptersCompletedFragment]. */
fun newInstance(internalProfileId: Int): MarkChaptersCompletedFragment {
fun newInstance(
internalProfileId: Int,
showConfirmationNotice: Boolean
): MarkChaptersCompletedFragment {
val markChaptersCompletedFragment = MarkChaptersCompletedFragment()
val args = Bundle()
args.putInt(PROFILE_ID_ARGUMENT_KEY, internalProfileId)
args.putBoolean(SHOW_CONFIRMATION_NOTICE_ARGUMENT_KEY, showConfirmationNotice)
markChaptersCompletedFragment.arguments = args
return markChaptersCompletedFragment
}
Expand All @@ -43,26 +49,28 @@ class MarkChaptersCompletedFragment : InjectableFragment() {
): View? {
val args =
checkNotNull(arguments) { "Expected arguments to be passed to MarkChaptersCompletedFragment" }
val internalProfileId = args
.getInt(PROFILE_ID_ARGUMENT_KEY, -1)
var selectedExplorationIdList = ArrayList<String>()
if (savedInstanceState != null) {
selectedExplorationIdList =
savedInstanceState.getStringArrayList(EXPLORATION_ID_LIST_ARGUMENT_KEY)!!
}
val internalProfileId = args.getInt(PROFILE_ID_ARGUMENT_KEY, /* defaultValue= */ -1)
val showConfirmationNotice =
args.getBoolean(SHOW_CONFIRMATION_NOTICE_ARGUMENT_KEY, /* defaultValue= */ false)
return markChaptersCompletedFragmentPresenter.handleCreateView(
inflater,
container,
internalProfileId,
selectedExplorationIdList
showConfirmationNotice,
savedInstanceState?.getStringArrayList(EXPLORATION_ID_LIST_ARGUMENT_KEY) ?: listOf(),
savedInstanceState?.getStringArrayList(EXPLORATION_TITLE_LIST_ARGUMENT_KEY) ?: listOf()
)
}

override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState)
outState.putStringArrayList(
EXPLORATION_ID_LIST_ARGUMENT_KEY,
markChaptersCompletedFragmentPresenter.selectedExplorationIdList
markChaptersCompletedFragmentPresenter.serializableSelectedExplorationIds
)
outState.putStringArrayList(
EXPLORATION_TITLE_LIST_ARGUMENT_KEY,
markChaptersCompletedFragmentPresenter.serializableSelectedExplorationTitles
)
}
}
Loading