-
Notifications
You must be signed in to change notification settings - Fork 11
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
ALTAPPS-542: [Shared, iOS] topics completion #326
ALTAPPS-542: [Shared, iOS] topics completion #326
Conversation
…pletion # Conflicts: # androidHyperskillApp/src/main/java/org/hyperskill/app/android/track/view/fragment/TrackFragment.kt # iosHyperskillApp/iosHyperskillApp/Sources/Modules/Track/Views/TrackView.swift # shared/src/commonMain/kotlin/org/hyperskill/app/home/injection/HomeComponentImpl.kt # shared/src/commonMain/kotlin/org/hyperskill/app/topics/domain/model/TopicProgress.kt # shared/src/commonMain/kotlin/org/hyperskill/app/track/presentation/TrackFeature.kt
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
shared/src/commonMain/kotlin/org/hyperskill/app/step/presentation/StepActionDispatcher.kt
Outdated
Show resolved
Hide resolved
shared/src/commonMain/kotlin/org/hyperskill/app/step/presentation/StepActionDispatcher.kt
Outdated
Show resolved
Hide resolved
shared/src/commonMain/kotlin/org/hyperskill/app/step_quiz/presentation/StepQuizResolver.kt
Outdated
Show resolved
Hide resolved
.../src/commonMain/kotlin/org/hyperskill/app/step_quiz/presentation/StepQuizActionDispatcher.kt
Outdated
Show resolved
Hide resolved
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
842d3b9
to
569d278
Compare
.../src/main/java/org/hyperskill/app/android/step_quiz/view/fragment/DefaultStepQuizFragment.kt
Outdated
Show resolved
Hide resolved
iosHyperskillApp/iosHyperskillApp/Sources/Frameworks/Routers/StackRouter.swift
Outdated
Show resolved
Hide resolved
iosHyperskillApp/iosHyperskillApp/Sources/Frameworks/Routers/StackRouter.swift
Outdated
Show resolved
Hide resolved
iosHyperskillApp/iosHyperskillApp/Sources/Frameworks/Routers/StackRouter.swift
Outdated
Show resolved
Hide resolved
shared/src/commonMain/kotlin/org/hyperskill/app/step/domain/model/BlockName.kt
Outdated
Show resolved
Hide resolved
shared/src/commonMain/kotlin/org/hyperskill/app/step/presentation/StepReducer.kt
Show resolved
Hide resolved
shared/src/commonMain/kotlin/org/hyperskill/app/step/remote/StepRemoteDataSourceImpl.kt
Outdated
Show resolved
Hide resolved
shared/src/commonMain/kotlin/org/hyperskill/app/step_quiz/injection/StepQuizComponentImpl.kt
Outdated
Show resolved
Hide resolved
shared/src/commonMain/kotlin/org/hyperskill/app/step_quiz/presentation/StepQuizReducer.kt
Outdated
Show resolved
Hide resolved
shared/src/commonMain/kotlin/org/hyperskill/app/topics/domain/interactor/TopicsInteractor.kt
Outdated
Show resolved
Hide resolved
shared/src/commonMain/kotlin/org/hyperskill/app/step/domain/model/Step.kt
Outdated
Show resolved
Hide resolved
This comment was marked as resolved.
This comment was marked as resolved.
…pletion # Conflicts: # androidHyperskillApp/src/main/java/org/hyperskill/app/android/core/injection/AndroidAppComponentImpl.kt # iosHyperskillApp/iosHyperskillApp/Sources/Modules/Home/Views/HomeView.swift # iosHyperskillApp/iosHyperskillApp/Sources/Modules/Track/Views/TrackView.swift # shared/src/commonMain/kotlin/org/hyperskill/app/core/injection/AppGraph.kt # shared/src/commonMain/kotlin/org/hyperskill/app/home/injection/HomeComponentImpl.kt # shared/src/iosMain/kotlin/org/hyperskill/app/core/injection/AppGraphImpl.kt
…opics_completion' into feature/ALTAPPS_542/shared_iOS_topics_completion
@vladkash the problem was that when the "Start Practicing" or "Continue" buttons were tapped it updated You can print the pointer address of the view model using this code: let address = Unmanaged<AnyObject>.passUnretained(viewModel).toOpaque()
let _ = print("address of ViewModel = \(address)") Also, when I debugged this issue I found that we have retained cycles, when SwiftUI View disappears its view model not deallocates. For example, suppose something like: class MyObject {
var function = { () }
}
struct MyStruct {
let obj = MyObject()
func structMethod() { ... }
init() {
obj.function = { structMethod() }
}
} The closure will capture I'll take one last look at the PR and we'll be ready to merge it. |
YouTrack Issues:
#ALTAPPS-542
Checklist
Before Code Review:
Description
Start practicing button flow
StepCompletionFeature.Message.StartPracticingClicked (via StepFeature.Message.StepCompletionMessage) -> StepCompletionFeature.Action.FetchNextStepQuiz -> StepCompletionFeature.Message.NextStepQuizFetchedStatus.(Success|Error) -> StepCompletionFeature.Action.ViewAction.(ReloadStep|ShowPracticingErrorStatus) (via StepFeature.Action.ViewAction.StepCompletionViewAction)
Continue button flow
StepCompletionFeature.Message.ContinuePracticingClicked (via StepFeature.Message.StepCompletionMessage) -> (StepCompletionFeature.Action.FetchNextStepQuiz | StepCompletionFeature.Action.ViewAction.NavigateTo.Back | StepCompletionFeature.Action.ViewAction.NavigateTo.HomeScreen) -> StepCompletionFeature.Message.NextStepQuizFetchedStatus.(Success|Error) -> StepCompletionFeature.Action.ViewAction.(ReloadStep|ShowPracticingErrorStatus) (via StepFeature.Action.ViewAction.StepCompletionViewAction)
Checking topic completion
notificationInteractor.solvedStepsSharedFlow -> StepCompletionFeature.Message.StepSolved -> StepCompletionFeature.Action.CheckTopicCompletion -> StepCompletionFeature.Message.CurrentTopicStatus.(Completed | Uncompleted) -> StepCompletionFeature.Action.ViewAction.ShowTopicCompletedModal (via StepFeature.Action.ViewAction.StepCompletionViewAction)
Minor changes
BlockName.supportedBlocksNames
extension to manage different supported step types on both platforms