You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Image replacement is not respected during tns run android #2981
If an existing image in the app folder (outside App_Resources) is replaced during tns run android, the application on the device does not get updated with the new image. However, if the application is restarted, the new image is shown. The same scenario works for iOS.
Version of CLI, runtimes and tns-core-modules packages: 3.1.0.
Steps:
tns create appJS && appJS
mkdir app/img/ - make a img directory in the app folder
add an image to the app/img folder
refer the image in the main-page.xml, for example: <Image src="~/img/icon.png" />
tne run android
replace the image
Expected: the application page refreshes and the new image shows.
Actual: the application page refreshes, but the new image does not show. The old one is still on the page.
On the cli and runtime side everything looks ok. Runtime has livesynced the new image into the application, and calls the livesync hook as it should. That leads me to believe the nativescript modules can't recognize that the icon.png has changed. ping: @PanayotCankov@vakrilov
Activity
Plamen5kov commentedon Jul 24, 2017
On the cli and runtime side everything looks ok. Runtime has livesynced the new image into the application, and calls the livesync hook as it should. That leads me to believe the nativescript modules can't recognize that the
icon.pnghas changed. ping: @PanayotCankov @vakrilovhshristov commentedon Aug 1, 2017
@vchimev, @Plamen5kov We are using memory and disk cache on the Image component. That is why changing the file won't change the currently shown image.
There are several options:
Plamen5kov commentedon Aug 1, 2017
My vote goes toward
Disable cache for specific Image instance.vchimev commentedon Aug 1, 2017
Disable cache for specific Image instance sounds better to me.
@hshristov, what do you think would be the best?
Plamen5kov commentedon Aug 3, 2017
I'm opening a new issue in the modules because this is no longer a CLI problem.
Add test for NativeScript/nativescript-cli#2981