Load previous state in alt text modal (#546)
This commit is contained in:
@@ -15,7 +15,7 @@ export class ImageModel implements RNImage {
|
||||
width: number
|
||||
height: number
|
||||
size: number
|
||||
altText?: string = undefined
|
||||
altText = ''
|
||||
cropped?: RNImage = undefined
|
||||
compressed?: RNImage = undefined
|
||||
scaledWidth: number = POST_IMG_MAX.width
|
||||
@@ -45,7 +45,7 @@ export class ImageModel implements RNImage {
|
||||
|
||||
async setAltText() {
|
||||
try {
|
||||
const altText = await openAltTextModal(this.rootStore)
|
||||
const altText = await openAltTextModal(this.rootStore, this.altText)
|
||||
|
||||
runInAction(() => {
|
||||
this.altText = altText
|
||||
|
||||
@@ -43,6 +43,7 @@ export interface CropImageModal {
|
||||
|
||||
export interface AltTextImageModal {
|
||||
name: 'alt-text-image'
|
||||
prevAltText: string
|
||||
onAltTextSet: (altText?: string) => void
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user