fix: resolve IndexOutOfBounds error when removing images from top card (#6124)
Some checks failed
Android CI / Run tests and generate APK (push) Has been cancelled

replace deprecated onBackPressed with onBackPressedCallback

remove unit test for deprecated onBackPressed method

remove if-check before deleting picture to prevent hiding top thumbnail card

hide the thumbnail card on fragments other than MediaDetailFragment

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
This commit is contained in:
Rohit Verma 2025-04-05 19:17:27 +05:30 committed by GitHub
parent 51da9e4dd6
commit 7bf9276d1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 107 additions and 97 deletions

View file

@ -262,15 +262,4 @@ class UploadActivityUnitTests {
method.isAccessible = true
method.invoke(activity)
}
@Test
@Throws(Exception::class)
fun testOnBackPressed() {
val method: Method =
UploadActivity::class.java.getDeclaredMethod(
"onBackPressed",
)
method.isAccessible = true
method.invoke(activity)
}
}