Skip to content

Commit 5a5fcbf

Browse files
author
Leandro Ferreira
committed
Merge branch 'main' of github.com:Writeopia/Writeopia
2 parents afc6b2f + 9d53b1a commit 5a5fcbf

9 files changed

Lines changed: 322 additions & 680 deletions

File tree

application/features/editor/src/commonMain/kotlin/io/writeopia/editor/features/editor/ui/desktop/edit/menu/SideEditorOptions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ private fun AiOptions(
675675

676676
TextButton(
677677
modifier = Modifier.fillMaxWidth(),
678-
text = WrStrings.askAi(),
678+
text = "Prompt",
679679
paddingValues = smallButtonPadding(),
680680
onClick = askAiBySelection
681681
)

application/features/editor/src/commonMain/kotlin/io/writeopia/editor/features/editor/viewmodel/NoteEditorKmpViewModel.kt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import kotlinx.coroutines.flow.combine
5353
import kotlinx.coroutines.flow.filterNotNull
5454
import kotlinx.coroutines.flow.flatMapLatest
5555
import kotlinx.coroutines.flow.map
56+
import kotlinx.coroutines.flow.onCompletion
5657
import kotlinx.coroutines.flow.onEach
5758
import kotlinx.coroutines.flow.onStart
5859
import kotlinx.coroutines.flow.stateIn
@@ -469,6 +470,9 @@ class NoteEditorKmpViewModel(
469470
position = position
470471
)
471472
}
473+
.onCompletion {
474+
writeopiaManager.trackState()
475+
}
472476
.collect { result ->
473477
val text = when (result) {
474478
is ResultData.Complete -> result.data
@@ -485,7 +489,8 @@ class NoteEditorKmpViewModel(
485489
text = text
486490
),
487491
position = position,
488-
)
492+
),
493+
trackIt = false
489494
)
490495
}
491496
}
@@ -603,6 +608,9 @@ class NoteEditorKmpViewModel(
603608
position = position
604609
)
605610
}
611+
.onCompletion {
612+
writeopiaManager.trackState()
613+
}
606614
.collect { result ->
607615
val text = when (result) {
608616
is ResultData.Complete -> result.data
@@ -619,7 +627,8 @@ class NoteEditorKmpViewModel(
619627
text = text
620628
),
621629
position = position,
622-
)
630+
),
631+
trackIt = false
623632
)
624633
}
625634
}

writeopia/src/commonMain/kotlin/io/writeopia/sdk/model/action/BackstackAction.kt

Lines changed: 0 additions & 79 deletions
This file was deleted.

writeopia_ui/src/commonMain/kotlin/io/writeopia/ui/backstack/BackstackManager.kt

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)