pub fn record_new_install_theme(
context: &ProductContext,
theme: &str,
product_themes: ProductThemes,
) -> Result<bool, String>Expand description
Records theme as the saved theme when context‘s product has neither a
config file nor a state file: a new install. Returns whether it recorded.
product_themes are the app’s own theme documents
(ProductBuild.product_themes, &[] for none), which theme may be a
variant of. An existing install, including one whose files are unreadable
or malformed, is left alone. Nothing is written, and an error returned,
when a new install’s product themes fail the checks startup makes, when
theme is not a variant of the product’s theme catalogue, or when the
files’ folder cannot be read, so a new install cannot be told from an
existing one. Only the desktop app calls this, before it starts;
command-line and headless runs must not.