Call `setgamesaved(False)` in `update_story_chunk` and `remove_story_chunk`
This commit is contained in:
parent
82455e310b
commit
fab0913270
|
@ -3228,6 +3228,7 @@ def update_story_chunk(idx: Union[int, str]):
|
||||||
# prompt might not have been shown yet (with a "Generating story..."
|
# prompt might not have been shown yet (with a "Generating story..."
|
||||||
# message instead).
|
# message instead).
|
||||||
refresh_story()
|
refresh_story()
|
||||||
|
setgamesaved(False)
|
||||||
return
|
return
|
||||||
|
|
||||||
idx = (vars.actions.get_last_key() if len(vars.actions) else 0) + 1
|
idx = (vars.actions.get_last_key() if len(vars.actions) else 0) + 1
|
||||||
|
@ -3246,6 +3247,8 @@ def update_story_chunk(idx: Union[int, str]):
|
||||||
chunk_text = f'<chunk n="{idx}" id="n{idx}" tabindex="-1">{formatforhtml(item)}</chunk>'
|
chunk_text = f'<chunk n="{idx}" id="n{idx}" tabindex="-1">{formatforhtml(item)}</chunk>'
|
||||||
emit('from_server', {'cmd': 'updatechunk', 'data': {'index': idx, 'html': chunk_text}}, broadcast=True)
|
emit('from_server', {'cmd': 'updatechunk', 'data': {'index': idx, 'html': chunk_text}}, broadcast=True)
|
||||||
|
|
||||||
|
setgamesaved(False)
|
||||||
|
|
||||||
#If we've set the auto save flag, we'll now save the file
|
#If we've set the auto save flag, we'll now save the file
|
||||||
if vars.autosave and (".json" in vars.savedir):
|
if vars.autosave and (".json" in vars.savedir):
|
||||||
save()
|
save()
|
||||||
|
@ -3256,6 +3259,7 @@ def update_story_chunk(idx: Union[int, str]):
|
||||||
#==================================================================#
|
#==================================================================#
|
||||||
def remove_story_chunk(idx: int):
|
def remove_story_chunk(idx: int):
|
||||||
emit('from_server', {'cmd': 'removechunk', 'data': idx}, broadcast=True)
|
emit('from_server', {'cmd': 'removechunk', 'data': idx}, broadcast=True)
|
||||||
|
setgamesaved(False)
|
||||||
|
|
||||||
|
|
||||||
#==================================================================#
|
#==================================================================#
|
||||||
|
|
Loading…
Reference in New Issue