lt-app icon indicating copy to clipboard operation
lt-app copied to clipboard

"Mark as unfinished" button for finished lessons

Open SyntaxBlitz opened this issue 4 years ago • 4 comments

Currently the only way to mark a lesson as unfinished is to delete all course progress. That seems silly.

Where there's currently a "Mark as finished" button (in the bottom sheet), we should have a "Mark as unfinished" button if the track is already marked as finished.

SyntaxBlitz avatar May 28 '20 05:05 SyntaxBlitz

Hey there, @SyntaxBlitz!

I'd like to work on this if that's possible. Although I'm still a bit of a beginner when it comes to React Native (but I've used it as well as React in the past) so it might take me a while.

Let me know if that's okay and if there's anything I need to know before starting. Thanks!

kevingdc avatar Jul 05 '20 01:07 kevingdc

Go for it! :)

I think the biggest awkward point here will be in ListenBody.react, in particular this line:

height={downloaded ? 236 : 164}

If you add an item to the bottom sheet, you'll need to make sure to update the size of the sheet. I'm not sure it matters, though, since there's a good chance you can just re-use the existing "Mark as finished" button.

SyntaxBlitz avatar Jul 06 '20 04:07 SyntaxBlitz

Awesome, thanks!

Ahh, yeah, you're right. I already tried it out and ended up using the "Mark as finished" button so I didn't need to update the size.

Although, it looks like a lot of changes and improvements to the code were made to adapt it to iOS based on the pull request I saw. I'm thinking of just waiting until that's merged and then start from there. Or will it still be a while before it gets merged? What do you think?

kevingdc avatar Jul 06 '20 05:07 kevingdc

Good call, you may want to work on top of the iOS branch. I'm hoping to merge it soon but this may not happen right away.

SyntaxBlitz avatar Jul 06 '20 21:07 SyntaxBlitz