Skip to content

Commit b021c48

Browse files
authored
Merge pull request #380 from mikepenz/develop
dev -> main
2 parents 4a5608a + 7681201 commit b021c48

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
gradle-${{ runner.os }}-
4646
4747
- name: Publish the macOS artifacts
48-
if: matrix.os == 'macos-14'
48+
if: matrix.os == 'macos-latest'
4949
env:
5050
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.NEXUS_USERNAME }}
5151
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.NEXUS_PASSWORD }}
@@ -174,4 +174,4 @@ jobs:
174174
prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-b') || contains(github.ref, '-a') }}
175175
files: artifacts/*
176176
env:
177-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,16 @@ Markdown(markdownState)
122122

123123
### Parse Markdown in VM
124124

125+
> [!NOTE]
126+
> This approach is also advised if you want to retain scroll position even when navigating away
127+
> See: https://github.com/mikepenz/multiplatform-markdown-renderer/issues/374
128+
> Retaining state in the VM ensures parsing will not have to be done again, and the component can be
129+
> immediately filled.
130+
125131
```kotlin
126132
// In the VM setup the flow to parse the markdown
127133
val markdownFlow = parseMarkdownFlow("# Markdown")
134+
.stateIn(lifecycleScope, SharingStarted.Eagerly, State.Loading())
128135

129136
// In the Composable use the flow
130137
val state by markdownFlow.collectAsStateWithLifecycle(State.Loading())

0 commit comments

Comments
 (0)