Skip to content

Commit

Permalink
Fix Lint checks
Browse files Browse the repository at this point in the history
  • Loading branch information
dattasneha committed Sep 3, 2024
1 parent 2ae2eec commit c7536cc
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,14 @@ class AdministratorControlsActivity :
)
title = resourceHandler.getStringInLocale(R.string.administrator_controls)

onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(/* enabled = */ true) {
override fun handleOnBackPressed() {
this@AdministratorControlsActivity.handleBackPress()
onBackPressedDispatcher.addCallback(
this,
object : OnBackPressedCallback(/* enabled = */ true) {
override fun handleOnBackPressed() {
this@AdministratorControlsActivity.handleBackPress()
}
}
})
)
}

override fun routeToAppVersion() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ class AppVersionActivity : InjectableAutoLocalizedAppCompatActivity() {
(activityComponent as ActivityComponentImpl).inject(this)
appVersionActivityPresenter.handleOnCreate()

onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(/* enabled = */ true) {
override fun handleOnBackPressed() {
finish()
onBackPressedDispatcher.addCallback(
this,
object : OnBackPressedCallback(/* enabled = */ true) {
override fun handleOnBackPressed() {
finish()
}
}
})
)
}

override fun onOptionsItemSelected(item: MenuItem): Boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,22 @@ import javax.inject.Inject
* a particular user or group.
*/
class ProfileAndDeviceIdActivity : InjectableAutoLocalizedAppCompatActivity() {
@Inject lateinit var profileAndDeviceIdActivityPresenter: ProfileAndDeviceIdActivityPresenter
@Inject
lateinit var profileAndDeviceIdActivityPresenter: ProfileAndDeviceIdActivityPresenter

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
(activityComponent as ActivityComponentImpl).inject(this)
profileAndDeviceIdActivityPresenter.handleOnCreate()

onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(/* enabled = */ true) {
override fun handleOnBackPressed() {
finish()
onBackPressedDispatcher.addCallback(
this,
object : OnBackPressedCallback(/* enabled = */ true) {
override fun handleOnBackPressed() {
finish()
}
}
})
)
}

override fun onOptionsItemSelected(item: MenuItem): Boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ class MarkChaptersCompletedActivity : InjectableAutoLocalizedAppCompatActivity()
markChaptersCompletedActivityPresenter.handleOnCreate(internalProfileId, showConfirmationNotice)
title = resourceHandler.getStringInLocale(R.string.mark_chapters_completed_activity_title)

onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(/* enabled = */ true) {
override fun handleOnBackPressed() {
finish()
onBackPressedDispatcher.addCallback(
this,
object : OnBackPressedCallback(/* enabled = */ true) {
override fun handleOnBackPressed() {
finish()
}
}
})
)
}

override fun onOptionsItemSelected(item: MenuItem): Boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ class MarkStoriesCompletedActivity : InjectableAutoLocalizedAppCompatActivity()
markStoriesCompletedActivityPresenter.handleOnCreate(internalProfileId)
title = resourceHandler.getStringInLocale(R.string.mark_stories_completed_activity_title)

onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(/* enabled = */ true) {
override fun handleOnBackPressed() {
finish()
onBackPressedDispatcher.addCallback(
this,
object : OnBackPressedCallback(/* enabled = */ true) {
override fun handleOnBackPressed() {
finish()
}
}
})
)
}

override fun onOptionsItemSelected(item: MenuItem): Boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ class MarkTopicsCompletedActivity : InjectableAutoLocalizedAppCompatActivity() {
markTopicsCompletedActivityPresenter.handleOnCreate(internalProfileId)
title = resourceHandler.getStringInLocale(R.string.mark_topics_completed_activity_title)

onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(/* enabled = */ true) {
override fun handleOnBackPressed() {
finish()
onBackPressedDispatcher.addCallback(
this,
object : OnBackPressedCallback(/* enabled = */ true) {
override fun handleOnBackPressed() {
finish()
}
}
})
)
}

override fun onOptionsItemSelected(item: MenuItem): Boolean {
Expand Down

0 comments on commit c7536cc

Please sign in to comment.