language-transfer / lt-app

React Native application for Language Transfer
https://www.languagetransfer.org/
Other
291 stars 26 forks source link

"Mark as unfinished" button for finished lessons #7

Open SyntaxBlitz opened 4 years ago

SyntaxBlitz commented 4 years ago

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.

kevingdc commented 4 years ago

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!

SyntaxBlitz commented 4 years ago

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.

kevingdc commented 4 years ago

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?

SyntaxBlitz commented 3 years ago

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.