Skip to content

Commit

Permalink
refactor: remove manual slide calls
Browse files Browse the repository at this point in the history
  • Loading branch information
BrayanDSO committed Dec 9, 2023
1 parent cbb80b7 commit d6071bc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
3 changes: 0 additions & 3 deletions AnkiDroid/src/main/java/com/ichi2/anki/FilteredDeckOptions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ package com.ichi2.anki
import android.content.SharedPreferences
import android.os.Bundle
import android.preference.*
import com.ichi2.anim.ActivityTransitionAnimation
import com.ichi2.anim.ActivityTransitionAnimation.slide
import com.ichi2.anki.analytics.UsageAnalytics
import com.ichi2.annotations.NeedsTest
import com.ichi2.libanki.Collection
Expand Down Expand Up @@ -264,7 +262,6 @@ class FilteredDeckOptions :
}
}
finish()
slide(this, ActivityTransitionAnimation.Direction.FADE)
}

@Suppress("deprecation") // conversion to fragments tracked in github as #5019
Expand Down
10 changes: 0 additions & 10 deletions AnkiDroid/src/main/java/com/ichi2/anki/StudyOptionsFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ import androidx.appcompat.widget.Toolbar
import androidx.core.text.HtmlCompat
import androidx.core.view.MenuItemCompat
import androidx.fragment.app.Fragment
import com.ichi2.anim.ActivityTransitionAnimation
import com.ichi2.anim.ActivityTransitionAnimation.slide
import com.ichi2.anki.CollectionManager.withCol
import com.ichi2.anki.dialogs.customstudy.CustomStudyDialog
import com.ichi2.anki.snackbar.showSnackbar
Expand Down Expand Up @@ -125,7 +123,6 @@ class StudyOptionsFragment : Fragment(), Toolbar.OnMenuItemClickListener {
i.putExtra("defaultConfig", defaultConfig)
Timber.i("openFilteredDeckOptions()")
onDeckOptionsActivityResult.launch(i)
slide(requireActivity(), ActivityTransitionAnimation.Direction.FADE)
}

override fun onCreate(savedInstanceState: Bundle?) {
Expand Down Expand Up @@ -168,7 +165,6 @@ class StudyOptionsFragment : Fragment(), Toolbar.OnMenuItemClickListener {
if (!mFragmented && a != null) {
a.setResult(result)
a.finish()
slide(a, ActivityTransitionAnimation.Direction.END)
} else if (a == null) {
// getActivity() can return null if reference to fragment lingers after parent activity has been closed,
// which is particularly relevant when using AsyncTasks.
Expand All @@ -190,11 +186,6 @@ class StudyOptionsFragment : Fragment(), Toolbar.OnMenuItemClickListener {
startActivity(reviewer)
requireActivity().finish()
}
animateLeft()
}

private fun animateLeft() {
slide(requireActivity(), ActivityTransitionAnimation.Direction.START)
}

private fun initAllContentViews(studyOptionsView: View) {
Expand Down Expand Up @@ -245,7 +236,6 @@ class StudyOptionsFragment : Fragment(), Toolbar.OnMenuItemClickListener {
val i = com.ichi2.anki.pages.DeckOptions.getIntent(requireContext(), col!!.decks.current().id)
Timber.i("Opening deck options for activity result")
onDeckOptionsActivityResult.launch(i)
slide(requireActivity(), ActivityTransitionAnimation.Direction.FADE)
}
return true
}
Expand Down

0 comments on commit d6071bc

Please sign in to comment.