Skip to content

Commit

Permalink
version bump & update sentences hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivojawer committed Sep 11, 2022
1 parent 5b86c00 commit 7141aac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wollokmobile",
"version": "0.2.1",
"version": "0.3.0",
"private": true,
"scripts": {
"android": "react-native run-android",
Expand Down
10 changes: 7 additions & 3 deletions src/components/sentences/BodyMaker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@ export function BodyMaker({ codeContainer, setBody }: BodyMakerProps) {
const contextFQN = entityMemberFQN(codeContainer)

function addSentence(sentence: Sentence) {
setSentences([...sentences, sentence])
updateSentences([...sentences, sentence])
}

function updateSentences(newSentences: List<Sentence>) {
setSentences(newSentences)
runAsync(() => {
setProcessing(true)
setBody(new Body({ sentences: [...sentences, sentence] }))
setBody(new Body({ sentences: newSentences }))
setProcessing(false)
})
}
Expand Down Expand Up @@ -92,7 +96,7 @@ export function BodyMaker({ codeContainer, setBody }: BodyMakerProps) {
<MultiFabScreen actions={actions}>
<SentencesEditor
sentences={sentences}
onSentencesChanged={setSentences}
onSentencesChanged={updateSentences}
/>

<AssignmentFormModal
Expand Down
1 change: 1 addition & 0 deletions src/components/sentences/VisualSentence.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,6 @@ export function ReturnComponent({
const styles = StyleSheet.create({
touchableFullWidth: {
minWidth: '100%',
width: '100%',
},
})

0 comments on commit 7141aac

Please sign in to comment.