restring icon indicating copy to clipboard operation
restring copied to clipboard

Race condition

Open deano2390 opened this issue 6 years ago • 1 comments

I notice that the initial loading of strings is handled in an async task when you init the restring library in Application.onCreate();

This means that your first Activity can be shown before the loading of strings is complete and it therefore fails to show the dynamic strings.

I suggest allowing a way to synchronously initialise the string repository at boot time. This means locking the UI thread briefly but at least guarantees your strings will be ready before the first activity is presented.

deano2390 avatar Feb 25 '19 14:02 deano2390

Just to be clear, in my scenario the string loading is done by loading an xml file from disk which can be slow, slow enough in my case to cause the mentioned behaviour at least.

deano2390 avatar Feb 25 '19 14:02 deano2390