ScreamingHawk / android-slideshow

A simple slideshow application for your mobile.
MIT License
44 stars 44 forks source link

Fix sort order for Play From Here #118

Closed ScreamingHawk closed 6 years ago

ScreamingHawk commented 6 years ago

The Play From Here button currently sorts alphabetically by filename when it should sort alphabetically by path.

This should be an easy fix by changing this line: https://github.com/ScreamingHawk/android-slideshow/blob/master/app/src/main/java/link/standen/michael/slideshow/util/FileItemHelper.java#L68

e.g.

a/
  1.jpg
  2.jpg
b/
  1.jpg
  2.jpg
c/
  1.jpg
  2.jpg

Current:

a/1.jpg
b/1.jpg
c/1.jpg
a/2.jpg
b/2.jpg
c/2.jpg

Expected:

a/1.jpg
a/2.jpg
b/1.jpg
b/2.jpg
c/1.jpg
c/2.jpg
brandanlockwood commented 6 years ago

Can I work on this?

ScreamingHawk commented 6 years ago

Absolutely! Thanks so much

Let me know if you've got any questions and I can give you a hand.

Cheers, Michael

On Wed, 15 Aug 2018, 12:02 PM Brandan Lockwood, notifications@github.com wrote:

Can I work on this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ScreamingHawk/android-slideshow/issues/118#issuecomment-413053521, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZJSFSub4EYmNBBEfwYST2jL6lvBPwfks5uQ2UPgaJpZM4V2cnb .

brandanlockwood commented 6 years ago

Hi Michael, At https://github.com/ScreamingHawk/android-slideshow/blob/master/app/src/main/java/link/standen/michael/slideshow/model/FileItem.java#L59 is there reason to compare names versus paths?

ScreamingHawk commented 6 years ago

Not really.

Originally there was only a single folder to slideshow from, so the path part of the path was always the same. This fix should be as easy as changing that line as you've pointed out.

ScreamingHawk commented 6 years ago

Fixed in #119