From 92bfbd8c4b3a931b99746e14168ed485ebc9e3a5 Mon Sep 17 00:00:00 2001 From: Vishwajith-Shettigar Date: Wed, 26 Jun 2024 10:31:41 +0530 Subject: [PATCH] clear warnings --- .../app/topic/revisioncard/RevisionCardActivity.kt | 1 + .../revisioncard/RevisionCardActivityPresenter.kt | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivity.kt b/app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivity.kt index 2a8e33d3206..0dc515a04b7 100644 --- a/app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivity.kt +++ b/app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivity.kt @@ -115,6 +115,7 @@ class RevisionCardActivity : revisionCardActivityPresenter.dismissConceptCard() } + @Deprecated("Deprecated in Java") override fun onBackPressed() { revisionCardActivityPresenter.setReadingTextSizeMedium() onReturnToTopicRequested() diff --git a/app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivityPresenter.kt b/app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivityPresenter.kt index 01e9a2f80f6..a6873bfd685 100644 --- a/app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivityPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivityPresenter.kt @@ -30,6 +30,7 @@ import org.oppia.android.util.data.DataProviders.Companion.toLiveData import javax.inject.Inject /** The presenter for [RevisionCardActivity]. */ +@Suppress("DEPRECATION") @ActivityScope class RevisionCardActivityPresenter @Inject constructor( private val activity: AppCompatActivity, @@ -70,11 +71,10 @@ class RevisionCardActivityPresenter @Inject constructor( } retrieveReadingTextSize().observe( - activity, - { result -> - (activity as DefaultFontSizeStateListener).onDefaultFontSizeLoaded(result) - } - ) + activity + ) { result -> + (activity as DefaultFontSizeStateListener).onDefaultFontSizeLoaded(result) + } revisionCardToolbar = binding.revisionCardToolbar revisionCardToolbarTitle = binding.revisionCardToolbarTitle