funkyg / funkytunes

A streaming music player for Android, using torrents.
GNU General Public License v3.0
122 stars 24 forks source link

UI notification after selecting another song #19

Closed gjedeer closed 7 years ago

gjedeer commented 7 years ago

When you want to play other song than the first one there's no visible notification after clicking. My "tester" was very confused by this and thought it's impossible to switch songs.

funkyg commented 7 years ago

I just tried this. When you click on a different song while the first one is playing, it updates the notification and the bottom bar with the new song title etc. Or do you mean that theres no loading indicator?

gjedeer commented 7 years ago

Let me check if this is only happening with my branch... The player didn't update with the new song title.

gjedeer commented 7 years ago

built from current master: https://fb.gdr.name/funky.mp4

A notification like some spinning icon next to the chosen song would be nice but even what you're saying is not happning.

funkyg commented 7 years ago

Right, it has to load the song first. While its loading, it isnt showing any indication.

Agree that there should be a spinner and also a loading indicator in the notification and bottom bar.

gjedeer commented 7 years ago

Hey @funkyg could you help me out a bit? I have implemented a playing indicator and a progress bar in https://github.com/funkyg/funkytunes/tree/show-loading-notification and it even works but it looks like shit.

What I originally had in mind was adding an icon on the right of the list item. There would be a play icon for active song and a circular progress bar for the queued item.

But I didn't know how so you can see what I ended up doing. If you could take over and implement that or any other kind of layout, we could close this issue and have a nice new feature.

gjedeer commented 7 years ago

Also I'm aware this is a bad idea:

https://github.com/funkyg/funkytunes/blob/show-loading-notification/app/src/main/kotlin/com/github/funkyg/funkytunes/activities/PlayingQueueActivity.kt#L24

https://github.com/funkyg/funkytunes/blob/show-loading-notification/app/src/main/kotlin/com/github/funkyg/funkytunes/activities/PlayingQueueActivity.kt#L86

but I could not find a method for getting a holder for item "i".

funkyg commented 7 years ago

i think the easiest option would be like this:

  1. add a field loading to Song
  2. when clicking a song, refresh the listview, and set loading to true for that song
  3. use the loading field to show/hide the indicator in the list item
gjedeer commented 7 years ago

Okay, I did that. One remaining question is:

https://github.com/funkyg/funkytunes/commit/b28cc32d5c79ee614bd7d3aad920c2608066bc73#diff-d371428fc66df142dee9e9b9c027e018L142

Is there a reason why you were using a new Song instance? Having two instances for the same song fucked up progress.

It seems to work okay though.

funkyg commented 7 years ago

i think the reason was to keep Song immutable, but thats not so important

gjedeer commented 7 years ago

Yeah hard to keep it immutable with the progress field