Skip to content

Commit

Permalink
fix ktlint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Tejas-67 committed Jun 16, 2024
1 parent dca38bf commit cd2cf5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import android.content.Context
import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.util.Log
import org.oppia.android.app.activity.ActivityComponentImpl
import org.oppia.android.app.activity.InjectableAutoLocalizedAppCompatActivity
import org.oppia.android.app.model.ScreenName.PROFILE_EDIT_ACTIVITY
Expand Down Expand Up @@ -44,8 +43,7 @@ class ProfileEditActivity : InjectableAutoLocalizedAppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
onBackInvokedDispatcher.registerOnBackInvokedCallback(1000){
Log.w("profile-edit", "dispatch")
onBackInvokedDispatcher.registerOnBackInvokedCallback(1000) {
val isMultipane: Boolean = intent.extras!!.getBoolean(IS_MULTIPANE_EXTRA_KEY, false)
if (isMultipane) {
onBackPressedDispatcher.onBackPressed()
Expand All @@ -61,7 +59,6 @@ class ProfileEditActivity : InjectableAutoLocalizedAppCompatActivity() {
}

override fun onBackPressed() {
Log.w("profile-edit", "back pressed")
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
val isMultipane: Boolean = intent.extras!!.getBoolean(IS_MULTIPANE_EXTRA_KEY, false)
if (isMultipane) {
Expand All @@ -75,8 +72,7 @@ class ProfileEditActivity : InjectableAutoLocalizedAppCompatActivity() {
}
}

fun handleBackPressFromPresenter(){
Log.w("profile-edit", "here")
fun handleBackPressFromPresenter() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
onBackPressedDispatcher.onBackPressed()
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.oppia.android.app.settings.profile

import android.content.Intent
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
Expand Down

0 comments on commit cd2cf5d

Please sign in to comment.