(unsuccessful) attempt to avoid black flicker when switching profiles
debug setupProfileColors() calls
typo in method name
move async DB stuff away of AsyncTask it is deprecated the replacement is a single-thread executor instance in theory a multi-thread executor may work too, but there should not be so much concurrency on the DB level. getting the DB stuff away from the main thread should be enough
several fixes when there are no profiles after full room adoption in particular, the ProfileThemedActivity doesn't call finish() when there is no current profile, because this is exactly the case when the app has just been installed and the main activity's introductory interface needs to be shown
debug refinements
Room-based profile management MobileLedgerProfile is gone, Room spreads gradually
asynchronous profile initialisation the problem here was that the startup profile is read from the DB, synchronously, and all DB operations need to happen via Room off the main thread since at activity startup only the theme is needed, that, and the startup profile ID can be stored in the android preferences. actual loading of profile and further data can be done after the theme is setup, in the background, via Room
another step towards surrogate ID db objects rename profile's uuid column to catch (and remove) all its usages use default theme id for the initial theme id
better handling of theme change was broken if the theme is changed via the profile editor invoked by the "configure profile" button in the new transaction activity
ProfileThemedActivity: track current profile changes needed by the new transaction activity which uses the mProfile value (and its getApiVersion()) when saving the transaction. The API version could have been changed by the "possible API version mismatch" dialog, which may be used to open the profile editor
themes: secondary==primary, a bit closer primaryDark, no calculations all intermediate colours are calculated as a weighted average of the nearest theme color. this keeps the color calculations in one place -- tools/gen-styles.pl
Data: migrate profile to a private variable, provide methods for accessing it
remove another redundant call to setupProfileColors()
fix status bar background when switching profiles (and themes) it appears that if there is a theme defined in the app manifest, the status bar takes its background from there when the activity is recreate()'d after a profile/theme change however, this needs that the theme is set up before the AppCompatActivity's onCreate() is called
remove unised constant
ProfileThemedActivity: fetch current profile synchronously the onCreate method must finish setting up the theme before returning and giving way to creation of views if the current profile data comes asynchronously, it may be too late and some views may have already been created
whitespace
ProfileThemedActivity: load profile from options if none is loaded yet This may happen if the app is removed from memory while the new transaction activity is active; when the app is started later it goes straight to the new transaction activity and there is no profile loaded from the options db in the normal startup the main activity is first and it loads the profile. Another way to start the new transaction activity without passing via the main activity is through the app shortcuts
migrate a bunch of globals to LiveData