Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OfflineMode #243

Merged
merged 30 commits into from
May 11, 2024
Merged

OfflineMode #243

merged 30 commits into from
May 11, 2024

Conversation

npfrei
Copy link
Contributor

@npfrei npfrei commented May 9, 2024

Implemened an offlineMode for activities , allowing user to save activtities locally using the download button in the MoreInfo tab. Users can then see these activities in the favorites tab while offline

@Andy130604 Andy130604 added this to the Milestone 3 milestone May 9, 2024
Thimphou
Thimphou previously approved these changes May 10, 2024
Copy link
Contributor

@Thimphou Thimphou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your code looks good, thank you for your implementation! However, please make sure to comment in the upcoming future your functions in the DAO files!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great way of doing so!

Thimphou
Thimphou previously approved these changes May 10, 2024
Copy link
Contributor

@Thimphou Thimphou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice testing that improves our code coverage!

# Conflicts:
#	app/src/main/java/com/lastaoutdoor/lasta/ui/screen/moreinfo/MoreInfoScreen.kt
#	app/src/main/java/com/lastaoutdoor/lasta/viewmodel/MoreInfoScreenViewModel.kt
#	app/src/test/java/com/lastaoutdoor/lasta/viewmodel/MoreInfoScreenViewModelTest.kt
ecornamu
ecornamu previously approved these changes May 11, 2024
Copy link
Contributor

@ecornamu ecornamu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job ! The implementation is really clever and was much needed, thank you for spending time on it for the past weeks :) I added small comments on the else cases of your type transitions but they are not worth a change request, it's only something to take into account in case we change some naming conventions or add possibilities to some enums. Maybe a case switch would be better in this context

(Be careful in case you didn't notice the CI fails for the moment but I'm sure you are on it)

fun toClimbingSyle(s: String): ClimbingStyle {
return if (s == "Outdoor") {
ClimbingStyle.OUTDOOR
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe be careful with this else if in the future we add a third climbing style or change the naming

Difficulty.EASY
} else if (s == "Normal") {
Difficulty.NORMAL
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same remark for here, etc

Copy link

sonarcloud bot commented May 11, 2024

@npfrei npfrei merged commit c82020c into main May 11, 2024
3 checks passed
@npfrei npfrei deleted the OfflineMode2 branch May 11, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants