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

ALTAPPS-542: [Shared, iOS] topics completion #326

Merged
merged 29 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a7640a2
add start practicing button to theory screen & topic completed modal …
vladkash Jan 18, 2023
8b6c5e4
skip logic & analytic left
vladkash Jan 20, 2023
8c2edcd
stack router fixes
vladkash Jan 20, 2023
6315e72
add step skipping, analytic & small improvements
vladkash Jan 20, 2023
7154de0
Merge branch 'develop' into feature/ALTAPPS_542/shared_iOS_topics_com…
vladkash Jan 20, 2023
5afebfc
merge fixes
vladkash Jan 20, 2023
5dac19b
move finish transaction to more appropriate place
vladkash Jan 20, 2023
c120980
fix ktlint
vladkash Jan 20, 2023
311f287
fix ktlint
vladkash Jan 20, 2023
43591a4
fix ktlint
vladkash Jan 20, 2023
72cd31b
self review fixes
vladkash Jan 20, 2023
bc9e77b
move replacing navigation controller views to StepView
vladkash Jan 20, 2023
fa845f5
extracting topic completion to separate feature
vladkash Jan 25, 2023
1122b64
self review fixes
vladkash Jan 25, 2023
f28070f
self review fixes
vladkash Jan 25, 2023
4230cab
reivew fixes
vladkash Jan 25, 2023
4984d20
Merge branch 'develop' into feature/ALTAPPS_542/shared_iOS_topics_com…
vladkash Jan 25, 2023
cb571e1
add performance measuring of next step loading
vladkash Jan 26, 2023
569d278
DefaultStepQuizFragment update TODO message
ivan-magda Jan 26, 2023
2530333
review fixes
vladkash Jan 31, 2023
38549af
Merge branch 'develop' into feature/ALTAPPS_542/shared_iOS_topics_com…
vladkash Feb 1, 2023
56cfb4b
Fix update StepQuizInput
ivan-magda Feb 1, 2023
beb6b17
Refactor rename
ivan-magda Feb 1, 2023
b8e2aaf
Update StartPracticingButton appearance
ivan-magda Feb 1, 2023
99d8d57
Update step quiz action buttons appearance
ivan-magda Feb 1, 2023
1e4c96a
Update StepTextView Coordinator
ivan-magda Feb 1, 2023
6de7543
Merge remote-tracking branch 'origin/feature/ALTAPPS_542/shared_iOS_t…
ivan-magda Feb 2, 2023
b3d5134
Clean up
ivan-magda Feb 2, 2023
641b2a5
navigate to back if no topic and continue button should fetch next step
vladkash Feb 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,14 @@ import org.hyperskill.app.step.injection.PlatformStepComponent
import org.hyperskill.app.step.injection.PlatformStepComponentImpl
import org.hyperskill.app.step.injection.StepComponent
import org.hyperskill.app.step.injection.StepComponentImpl
import org.hyperskill.app.step.injection.StepDataComponent
import org.hyperskill.app.step.injection.StepDataComponentImpl
import org.hyperskill.app.step_quiz.injection.PlatformStepQuizComponent
import org.hyperskill.app.step_quiz.injection.PlatformStepQuizComponentImpl
import org.hyperskill.app.step_quiz.injection.StepQuizComponent
import org.hyperskill.app.step_quiz.injection.StepQuizComponentImpl
import org.hyperskill.app.step_quiz.injection.StepQuizDataComponent
import org.hyperskill.app.step_quiz.injection.StepQuizDataComponentImpl
import org.hyperskill.app.step_quiz.injection.SubmissionDataComponent
import org.hyperskill.app.step_quiz.injection.SubmissionDataComponentImpl
import org.hyperskill.app.step_quiz_hints.injection.PlatformStepQuizHintsComponent
Expand Down Expand Up @@ -166,6 +170,12 @@ class AndroidAppComponentImpl(
override val topicsRepetitionsDataComponent: TopicsRepetitionsDataComponent =
TopicsRepetitionsDataComponentImpl(this)

override val stepDataComponent: StepDataComponent =
StepDataComponentImpl(this)

override val stepQuizDataComponent: StepQuizDataComponent =
StepQuizDataComponentImpl(this)

override fun buildPlatformAuthSocialWebViewComponent(): PlatformAuthSocialWebViewComponent =
PlatformAuthSocialWebViewComponentImpl()

Expand Down Expand Up @@ -203,8 +213,8 @@ class AndroidAppComponentImpl(
/**
* Step component
*/
override fun buildStepComponent(): StepComponent =
StepComponentImpl(this)
override fun buildStepComponent(stepRoute: StepRoute): StepComponent =
StepComponentImpl(this, stepRoute)

override fun buildPlatformStepComponent(stepComponent: StepComponent): PlatformStepComponent =
PlatformStepComponentImpl(stepComponent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ class StepFragment : Fragment(R.layout.fragment_step), ReduxView<StepFeature.Sta
super.onViewCreated(view, savedInstanceState)
initViewStateDelegate()
viewBinding.stepError.tryAgain.setOnClickListener {
stepViewModel.onNewMessage(StepFeature.Message.Initialize(stepRoute, forceUpdate = true))
stepViewModel.onNewMessage(StepFeature.Message.Initialize(forceUpdate = true))
}
stepViewModel.onNewMessage(StepFeature.Message.Initialize(stepRoute))
stepViewModel.onNewMessage(StepFeature.Message.ViewedEventMessage(stepRoute))
stepViewModel.onNewMessage(StepFeature.Message.Initialize())
stepViewModel.onNewMessage(StepFeature.Message.ViewedEventMessage)
}

private fun injectComponent() {
val stepComponent = HyperskillApp.graph().buildStepComponent()
val stepComponent = HyperskillApp.graph().buildStepComponent(stepRoute)
val platformStepComponent = HyperskillApp.graph().buildPlatformStepComponent(stepComponent)
viewModelFactory = platformStepComponent.reduxViewModelFactory
}
Expand Down Expand Up @@ -87,7 +87,7 @@ class StepFragment : Fragment(R.layout.fragment_step), ReduxView<StepFeature.Sta
val fragment = if (step.type == Step.Type.PRACTICE) {
StepPracticeFragment.newInstance(step, stepRoute)
} else {
StepTheoryFragment.newInstance(step)
StepTheoryFragment.newInstance(step, stepRoute)
}

childFragmentManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,36 @@ import org.hyperskill.app.android.step_quiz_unsupported.view.fragment.Unsupporte
import org.hyperskill.app.step.domain.model.BlockName
import org.hyperskill.app.step.domain.model.Step
import org.hyperskill.app.step.domain.model.StepRoute
import org.hyperskill.app.step_quiz.presentation.StepQuizResolver

object StepQuizFragmentFactory {
fun getQuizFragment(step: Step, stepRoute: StepRoute): Fragment =
when (step.block.name) {
BlockName.SORTING ->
SortingStepQuizFragment.newInstance(step, stepRoute)
if (StepQuizResolver.isQuizSupportable(step.block.name)) {
when (step.block.name) {
BlockName.SORTING ->
SortingStepQuizFragment.newInstance(step, stepRoute)

BlockName.NUMBER,
BlockName.STRING,
BlockName.MATH ->
TextStepQuizFragment.newInstance(step, stepRoute)
BlockName.NUMBER,
BlockName.STRING,
BlockName.MATH ->
TextStepQuizFragment.newInstance(step, stepRoute)

BlockName.MATCHING ->
MatchingStepQuizFragment.newInstance(step, stepRoute)
BlockName.MATCHING ->
MatchingStepQuizFragment.newInstance(step, stepRoute)

BlockName.TABLE ->
TableStepQuizFragment.newInstance(step, stepRoute)
BlockName.TABLE ->
TableStepQuizFragment.newInstance(step, stepRoute)

BlockName.CHOICE ->
ChoiceStepQuizFragment.newInstance(step, stepRoute)
BlockName.CHOICE ->
ChoiceStepQuizFragment.newInstance(step, stepRoute)

BlockName.CODE ->
CodeStepQuizFragment.newInstance(step, stepRoute)
BlockName.CODE ->
CodeStepQuizFragment.newInstance(step, stepRoute)

else ->
UnsupportedStepQuizFragment.newInstance()
else ->
UnsupportedStepQuizFragment.newInstance()
}
} else {
UnsupportedStepQuizFragment.newInstance()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ abstract class DefaultStepQuizFragment : Fragment(R.layout.fragment_step_quiz),
.newInstance(earnedGemsText = action.earnedGemsText)
.showIfNotExists(childFragmentManager, CompletedStepOfTheDayDialogFragment.TAG)
}
is StepQuizFeature.Action.ViewAction.NavigateTo.HomeScreen -> {
// TODO: implement navigation
}
is StepQuizFeature.Action.ViewAction.ShowTopicCompletedModal -> {
// TODO: implement topic completed modal
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import org.hyperskill.app.android.step_theory.view.model.StepTheoryRating
import org.hyperskill.app.core.view.mapper.ResourceProvider
import org.hyperskill.app.step.domain.model.CommentStatisticsEntry
import org.hyperskill.app.step.domain.model.Step
import org.hyperskill.app.step.domain.model.StepRoute
import org.hyperskill.app.step.view.mapper.CommentThreadTitleMapper
import ru.nobird.android.ui.adapterdelegates.dsl.adapterDelegate
import ru.nobird.android.ui.adapters.DefaultDelegateAdapter
Expand All @@ -35,9 +36,11 @@ class StepTheoryFragment : Fragment(R.layout.fragment_step_theory) {
companion object {
private const val STEP_CONTENT_FRAGMENT_TAG = "step_content"
private const val KEY_STEP = "key_step"
fun newInstance(step: Step): Fragment {
private const val KEY_STEP_ROUTE = "key_step_route"
fun newInstance(step: Step, stepRoute: StepRoute): Fragment {
val arguments = Bundle().apply {
putParcelable(KEY_STEP, step)
putParcelable(KEY_STEP_ROUTE, stepRoute)
}
return StepTheoryFragment().apply {
this.arguments = arguments
Expand All @@ -53,15 +56,17 @@ class StepTheoryFragment : Fragment(R.layout.fragment_step_theory) {
private val stepCommentStatisticsAdapter: DefaultDelegateAdapter<CommentStatisticsEntry> = DefaultDelegateAdapter()

private lateinit var step: Step
private lateinit var stepRoute: StepRoute

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
injectComponent()
step = requireArguments().getParcelable<Step>(KEY_STEP) ?: throw IllegalStateException("Step cannot be null")
stepRoute = requireArguments().getParcelable<StepRoute>(KEY_STEP_ROUTE) ?: throw IllegalStateException("Step route cannot be null")
}

private fun injectComponent() {
val stepComponent = HyperskillApp.graph().buildStepComponent()
val stepComponent = HyperskillApp.graph().buildStepComponent(stepRoute)
resourceProvider = HyperskillApp.graph().commonComponent.resourceProvider
commentThreadTitleMapper = stepComponent.commentThreadTitleMapper
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class TopicsRepetitionCardFormDelegate {
if (recommendedRepetitionsCount > 0) {
org.hyperskill.app.R.string.topics_repetitions_card_title_uncompleted
} else {
org.hyperskill.app.R.string.topics_repetitions_card_title_completed
org.hyperskill.app.R.string.good_job
}
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/action_button_height"
style="@style/ThemeOverlay.Blue"
android:text="@string/step_quiz_problem_of_day_solved_modal_go_to_homescreen_button_text"
android:text="@string/go_to_homescreen"
android:layout_marginTop="32dp"
android:layout_marginHorizontal="20dp"
app:layout_constraintBottom_toBottomOf="parent"
Expand Down
24 changes: 18 additions & 6 deletions iosHyperskillApp/iosHyperskillApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
2CDA984929445C0A00ADE539 /* ProfileStatisticsItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CDA984829445C0A00ADE539 /* ProfileStatisticsItemView.swift */; };
2CDBE6F528C10DCE00033679 /* NotificationPermissionStatusSettingsObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CDBE6F428C10DCE00033679 /* NotificationPermissionStatusSettingsObserver.swift */; };
2CDF14D228EEF9690060D972 /* AppTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CDF14D128EEF9690060D972 /* AppTabBarController.swift */; };
2CDF14D628EF02740060D972 /* PushRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CDF14D528EF02740060D972 /* PushRouter.swift */; };
2CDF14D628EF02740060D972 /* StackRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CDF14D528EF02740060D972 /* StackRouter.swift */; };
2CDF14D828EF1E080060D972 /* UINavigationControllerExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CDF14D728EF1E080060D972 /* UINavigationControllerExtensions.swift */; };
2CE1C4DF27EDFB3800220041 /* FeatureViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CE1C4DE27EDFB3800220041 /* FeatureViewModel.swift */; };
2CE1E189292CCB450041FE14 /* UIKitIntrospectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CE1E188292CCB450041FE14 /* UIKitIntrospectionView.swift */; };
Expand Down Expand Up @@ -345,6 +345,7 @@
E95D0F302941DF000074C9F3 /* AuthNewUserPlaceholderTrackCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E95D0F2F2941DF000074C9F3 /* AuthNewUserPlaceholderTrackCardView.swift */; };
E96E80F627EF57BA00AA6683 /* AuthSocialViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E96E80F527EF57BA00AA6683 /* AuthSocialViewModel.swift */; };
E97704782946F47000ACD7E7 /* AuthNewUserTrackModalViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E97704772946F47000ACD7E7 /* AuthNewUserTrackModalViewController.swift */; };
E97BEA1E2977D26F00348EEC /* TopicCompletedModalViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E97BEA1D2977D26F00348EEC /* TopicCompletedModalViewController.swift */; };
E9802D07281BB5CC00CF3AC1 /* StepQuizChoiceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9802D06281BB5CC00CF3AC1 /* StepQuizChoiceView.swift */; };
E9859B91292E414300857679 /* RepeatButtonInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9859B90292E414300857679 /* RepeatButtonInfo.swift */; };
E9886D3228ABCE5C003724F9 /* OnboardingOutputProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9886D3128ABCE5C003724F9 /* OnboardingOutputProtocol.swift */; };
Expand Down Expand Up @@ -702,7 +703,7 @@
2CDA984829445C0A00ADE539 /* ProfileStatisticsItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileStatisticsItemView.swift; sourceTree = "<group>"; };
2CDBE6F428C10DCE00033679 /* NotificationPermissionStatusSettingsObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationPermissionStatusSettingsObserver.swift; sourceTree = "<group>"; };
2CDF14D128EEF9690060D972 /* AppTabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppTabBarController.swift; sourceTree = "<group>"; };
2CDF14D528EF02740060D972 /* PushRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PushRouter.swift; sourceTree = "<group>"; };
2CDF14D528EF02740060D972 /* StackRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StackRouter.swift; sourceTree = "<group>"; };
2CDF14D728EF1E080060D972 /* UINavigationControllerExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UINavigationControllerExtensions.swift; sourceTree = "<group>"; };
2CE1C4DE27EDFB3800220041 /* FeatureViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeatureViewModel.swift; sourceTree = "<group>"; };
2CE1E188292CCB450041FE14 /* UIKitIntrospectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIKitIntrospectionView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -763,6 +764,7 @@
E95D0F2F2941DF000074C9F3 /* AuthNewUserPlaceholderTrackCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthNewUserPlaceholderTrackCardView.swift; sourceTree = "<group>"; };
E96E80F527EF57BA00AA6683 /* AuthSocialViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthSocialViewModel.swift; sourceTree = "<group>"; };
E97704772946F47000ACD7E7 /* AuthNewUserTrackModalViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthNewUserTrackModalViewController.swift; sourceTree = "<group>"; };
E97BEA1D2977D26F00348EEC /* TopicCompletedModalViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TopicCompletedModalViewController.swift; sourceTree = "<group>"; };
E9802D06281BB5CC00CF3AC1 /* StepQuizChoiceView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StepQuizChoiceView.swift; sourceTree = "<group>"; };
E9859B90292E414300857679 /* RepeatButtonInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepeatButtonInfo.swift; sourceTree = "<group>"; };
E9886D3128ABCE5C003724F9 /* OnboardingOutputProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingOutputProtocol.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1320,13 +1322,13 @@
2C41127528376ECE004948A3 /* Views */ = {
isa = PBXGroup;
children = (
E9ACD3402937342F0005E05B /* ProblemOfDaySolvedModalViewController.swift */,
2CA7614A2926272500987B66 /* StepQuizFeedbackView.swift */,
E99B21802887E535006A6154 /* StepQuizSkeletonViewFactory.swift */,
E99D4CEE2826B91100B49D52 /* StepQuizStatusView.swift */,
2CD48D882858657100CFCC4A /* StepQuizView.swift */,
2C41127628376F50004948A3 /* BottomControls */,
2CCD49712838E40F004DC3CE /* Header */,
E97BEA1C2977CDBC00348EEC /* Modal */,
2C7802C3285C933300082547 /* StepQuizActionButtons */,
);
path = Views;
Expand Down Expand Up @@ -1821,7 +1823,6 @@
2CAE8CF5280525DB00E6C83D /* Views */ = {
isa = PBXGroup;
children = (
2CAE8D0428055D8300E6C83D /* StepActionButton.swift */,
2CAE8CF628052F9600E6C83D /* StepHeaderView.swift */,
2C9F59A629267A530008ADC5 /* StepTextView.swift */,
2C8409522805BF3C009C6BE9 /* StepTheoryContentView.swift */,
Expand All @@ -1834,6 +1835,7 @@
2CAE8D0A280578A200E6C83D /* BottomControls */ = {
isa = PBXGroup;
children = (
2CAE8D0428055D8300E6C83D /* StepActionButton.swift */,
2CAE8D06280576C500E6C83D /* StepBottomControlsView.swift */,
2CAE8D082805789100E6C83D /* StepCommentsStatisticsView.swift */,
2C84094E2805B28B009C6BE9 /* StepRatingControl.swift */,
Expand All @@ -1856,7 +1858,7 @@
children = (
2CB279AE28C72AA400EDDCC8 /* DeepLinkRouterProtocol.swift */,
2C0EC2DE28F9E92D004A36B2 /* ModalRouter.swift */,
2CDF14D528EF02740060D972 /* PushRouter.swift */,
2CDF14D528EF02740060D972 /* StackRouter.swift */,
2C225E47281A5B6800E8ABD2 /* SourcelessRouter.swift */,
2CB279AC28C72A9500EDDCC8 /* TabBarRouter.swift */,
);
Expand Down Expand Up @@ -2299,6 +2301,15 @@
path = Views;
sourceTree = "<group>";
};
E97BEA1C2977CDBC00348EEC /* Modal */ = {
isa = PBXGroup;
children = (
E9ACD3402937342F0005E05B /* ProblemOfDaySolvedModalViewController.swift */,
E97BEA1D2977D26F00348EEC /* TopicCompletedModalViewController.swift */,
);
path = Modal;
sourceTree = "<group>";
};
E9802D03281BB5A500CF3AC1 /* StepQuizChoice */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -2821,6 +2832,7 @@
E9A6250F28ABAE83009423EE /* OnboardingViewModel.swift in Sources */,
2C65637628743F5B006AAD77 /* TrackAboutStatsView.swift in Sources */,
E9F504D029128B5300B788C7 /* StepQuizHintsAssembly.swift in Sources */,
E97BEA1E2977D26F00348EEC /* TopicCompletedModalViewController.swift in Sources */,
2CEEE03128916A3100282849 /* ProblemOfDayAssembly.swift in Sources */,
2C8E4FB628490C020011ADFA /* PanModalPresenter.swift in Sources */,
2C55133B28B8DFE8009F7627 /* Debouncer.swift in Sources */,
Expand Down Expand Up @@ -2920,7 +2932,7 @@
2C8E4FA12848BF1F0011ADFA /* StepQuizTableSelectColumnsViewController.swift in Sources */,
2C1F5877280D2B4800372A37 /* ApplicationInfo.swift in Sources */,
2C20FBBE284F658E006D879E /* ProcessedContentTextView.swift in Sources */,
2CDF14D628EF02740060D972 /* PushRouter.swift in Sources */,
2CDF14D628EF02740060D972 /* StackRouter.swift in Sources */,
2C20FBAE284F1D05006D879E /* FontWeightNameMapping.swift in Sources */,
2C2D4932281154CB00753F16 /* Injection.swift in Sources */,
2CB45764288ED6D4007C2D77 /* StepQuizActionButtonCodeQuizDelegate.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ extension Step {
type: Type_ = Type_.theory,
block: Block = .init(),
topicTheory: Int = 0,
topic: Int = 0,
commentsStatistics: [CommentStatisticsEntry] = [],
solvedBy: Int = 0,
isCompleted: Bool = false,
isNext: Bool = false,
canSkip: Bool = true,
secondsToComplete: Float? = nil,
lastCompletedAt: Kotlinx_datetimeInstant = .fromSwiftCurrentDate()
) {
Expand All @@ -20,9 +23,12 @@ extension Step {
type: type,
block: block,
topicTheory: KotlinLong(value: Int64(topicTheory)),
topic: Int64(topic),
commentsStatistics: commentsStatistics,
solvedBy: Int32(solvedBy),
isCompleted: isCompleted,
isNext: isNext,
canSkip: canSkip,
secondsToComplete: secondsToComplete != nil ? KotlinFloat(value: secondsToComplete.require()) : nil,
lastCompletedAt: lastCompletedAt
)
Expand Down
Loading