Skip to content

Commit

Permalink
remove launchActivityForResultWithAnimation
Browse files Browse the repository at this point in the history
  • Loading branch information
BrayanDSO committed Dec 21, 2023
1 parent c094dc4 commit 602d75e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
9 changes: 0 additions & 9 deletions AnkiDroid/src/main/java/com/ichi2/anki/AnkiActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,6 @@ open class AnkiActivity : AppCompatActivity, SimpleMessageDialogListener {
}
}

fun launchActivityForResultWithAnimation(
intent: Intent,
launcher: ActivityResultLauncher<Intent?>,
animation: Direction?
) {
enableIntentAnimation(intent)
launchActivityForResult(intent, launcher, animation)
}

override fun finish() {
finishWithAnimation(DEFAULT)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import androidx.appcompat.app.AlertDialog
import androidx.core.os.BundleCompat
import androidx.core.os.bundleOf
import androidx.fragment.app.DialogFragment
import com.ichi2.anim.ActivityTransitionAnimation
import com.ichi2.anki.AnkiActivity
import com.ichi2.anki.R
import com.ichi2.anki.analytics.UsageAnalytics
Expand Down Expand Up @@ -167,17 +166,9 @@ class ImportFileSelectionFragment : DialogFragment() {
extraMimes?.let { intent.putExtra(Intent.EXTRA_MIME_TYPES, it) }
if ((fileType == ImportFileType.APKG || fileType == ImportFileType.COLPKG) && activity is ApkgImportResultLauncherProvider) {
activity.launchActivityForResultWithAnimation(
intent,
activity.getApkgFileImportResultLauncher(),
ActivityTransitionAnimation.Direction.NONE
)
activity.getApkgFileImportResultLauncher().launch(intent)
} else if (fileType == ImportFileType.CSV && activity is CsvImportResultLauncherProvider) {
activity.launchActivityForResultWithAnimation(
intent,
activity.getCsvFileImportResultLauncher(),
ActivityTransitionAnimation.Direction.NONE
)
activity.getCsvFileImportResultLauncher().launch(intent)
} else {
Timber.w("Activity($activity) can't handle requested import: $fileType")
}
Expand Down

0 comments on commit 602d75e

Please sign in to comment.