File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -428,17 +428,20 @@ export class Img extends ImageBase {
428428 this . handleImageProgress ( totalSize > 0 ? currentSize / totalSize : - 1 , totalSize ) ;
429429 } ;
430430
431- private getUIImage ( path : string | ImageSource ) {
431+ private getUIImage ( imagePath : string | ImageSource ) {
432432 if ( ! path ) {
433433 return null ;
434434 }
435435 let image ;
436- if ( typeof path === 'string' ) {
437- if ( isFileOrResourcePath ( path ) ) {
438- image = ImageSource . fromFileOrResourceSync ( path ) ;
436+ if ( typeof imagePath === 'string' ) {
437+ if ( imagePath . indexOf ( '~/' ) === 0 ) {
438+ imagePath = path . join ( knownFolders . currentApp ( ) . path , imagePath . substring ( 2 ) ) ;
439+ }
440+ if ( isFileOrResourcePath ( imagePath ) ) {
441+ image = ImageSource . fromFileOrResourceSync ( imagePath ) ;
439442 }
440443 } else {
441- image = path ;
444+ image = imagePath ;
442445 }
443446
444447 // console.log("getUIImage", path, !!image, !!image && !!image.ios);
You can’t perform that action at this time.
0 commit comments