aashishksahu / SafeSpace

A safe place for your valuable information
GNU General Public License v3.0
144 stars 9 forks source link

Add "support" for Jpeg #31

Closed heschy2 closed 5 months ago

heschy2 commented 5 months ago

JPGE and JPG is basucally the same thing, however the former file-suffix is not supported. In order to display .jpeg Files in SafeSpace, I have to renam them to .jpg, could support for .joeg be added?

Since it is essentially just adding a string and an or i to an if statement it should be much work right?

Note: The former statement might be totally wrong because I didn't read the source code (I just began to learn Android Programming, so this is like taking a look into the linux kernel: useless)

heschy2 commented 5 months ago

Okay, I took a look into the source code, and in one way I was right: I dont understand it 🤣.

But I think I found out how to solve this.

In Constants.kt

        val IMAGE_EXTENSIONS = arrayOf(
            "jpg",
            "png",
            "gif",
            "webp",
            "tiff",
            "psd",
            "raw",
            "bmp",
            "svg",
            "heif"
        )

Would need the addition of the "jpeg" entry, right?

aashishksahu commented 5 months ago

Yup, you guessed it right, just added "jpeg" in the array and now it's supported. Watch out for the next update :)