-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "Finish!" button on the end of the lesson
- Loading branch information
1 parent
1da5fd7
commit 275ad9b
Showing
8 changed files
with
63 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
composeApp/src/commonMain/kotlin/ui/screen/lesson/handler/OnFinishClickEventHandler.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package ui.screen.lesson.handler | ||
|
||
import Platform | ||
import ivy.content.SoundsUrls | ||
import ui.EventHandler | ||
import ui.navigation.Navigation | ||
import ui.screen.lesson.LessonViewEvent | ||
import ui.screen.lesson.LessonViewModel.LocalState | ||
import ui.screen.lesson.LessonVmContext | ||
|
||
class OnFinishClickEventHandler( | ||
private val platform: Platform, | ||
private val navigation: Navigation, | ||
) : | ||
EventHandler<LessonViewEvent.OnContinueClick, LocalState> { | ||
override val eventTypes = setOf(LessonViewEvent.OnContinueClick::class) | ||
|
||
override suspend fun LessonVmContext.handleEvent( | ||
event: LessonViewEvent.OnContinueClick | ||
) { | ||
navigation.back() | ||
platform.playSound(SoundsUrls.CompleteLesson) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters