mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-30 10:36:35 +02:00
Mobile: Resolves #9134: Image editor: Allow loading from save when the image editor is reloaded in the background (#9135)
This commit is contained in:
parent
b8c26b2ef3
commit
86b00d0a2b
@ -16,11 +16,13 @@ const logger = Logger.create('ImageEditor');
|
||||
|
||||
type OnSaveCallback = (svgData: string)=> void;
|
||||
type OnCancelCallback = ()=> void;
|
||||
|
||||
// Returns the empty string to load from a template.
|
||||
type LoadInitialSVGCallback = ()=> Promise<string>;
|
||||
|
||||
interface Props {
|
||||
themeId: number;
|
||||
loadInitialSVGData: LoadInitialSVGCallback|null;
|
||||
loadInitialSVGData: LoadInitialSVGCallback;
|
||||
onSave: OnSaveCallback;
|
||||
onExit: OnCancelCallback;
|
||||
}
|
||||
|
@ -815,12 +815,7 @@ class NoteScreenComponent extends BaseScreenComponent {
|
||||
private drawPicture_onPress = async () => {
|
||||
// Create a new empty drawing and attach it now.
|
||||
const resource = await this.attachNewDrawing('');
|
||||
|
||||
this.setState({
|
||||
showImageEditor: true,
|
||||
loadImageEditorData: null,
|
||||
imageEditorResource: resource,
|
||||
});
|
||||
await this.editDrawing(resource);
|
||||
};
|
||||
|
||||
private async updateDrawing(svgData: string) {
|
||||
|
Loading…
Reference in New Issue
Block a user