Skip to content

Commit 2a312b1

Browse files
Merge pull request #92 from atlassian-labs/main
Create release 1.1.12
2 parents d7c62cd + 2ce87dc commit 2a312b1

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737

3838
# Tags the current commit with the version number
3939
- name: Create tag
40-
uses: actions/github-script@v7
40+
uses: actions/github-script@v8
4141
with:
4242
script: |
4343
github.rest.git.createRef({

collab/src/commonMain/kotlin/com/atlassian/prosemirror/collab/Collab.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ fun collab(config: CollabConfig = CollabConfig(0, null)): CollabPlugin {
9595
return CollabPlugin(config)
9696
}
9797

98-
class CollabPlugin(
98+
open class CollabPlugin(
9999
override val spec: CollabPluginSpec
100100
) : Plugin<CollabState>(spec) {
101101
constructor(config: CollabConfig) : this(
@@ -112,7 +112,7 @@ class CollabPlugin(
112112
}
113113
}
114114

115-
class CollabPluginSpec(conf: CollabConfig) : PluginSpec<CollabState>() {
115+
open class CollabPluginSpec(conf: CollabConfig) : PluginSpec<CollabState>() {
116116
override val key = collabKey
117117
override val state: StateField<CollabState> = object : StateField<CollabState> {
118118
override fun init(config: EditorStateConfig, instance: PMEditorState): CollabState {
@@ -128,7 +128,7 @@ class CollabPluginSpec(conf: CollabConfig) : PluginSpec<CollabState>() {
128128
val state = tr.getMeta(collabKey)
129129
return when {
130130
state != null -> state as CollabState
131-
tr.docChanged -> CollabState(value.version, value.unconfirmed + unconfirmedFrom(tr))
131+
shouldUpdateState(tr) -> CollabState(value.version, value.unconfirmed + unconfirmedFrom(tr))
132132
else -> value
133133
}
134134
}
@@ -143,6 +143,8 @@ class CollabPluginSpec(conf: CollabConfig) : PluginSpec<CollabState>() {
143143

144144
val config: CollabConfig by additionalProps
145145
val historyPreserveItems: Boolean by additionalProps
146+
147+
protected fun shouldUpdateState(tr: Transaction) = tr.docChanged
146148
}
147149

148150
/**

version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
projectVersion=1.1.11
1+
projectVersion=1.1.12

0 commit comments

Comments
 (0)