forked from I2P_Developers/i2p.i2p
When fetching a theme, if theme config key is not found, write out the default
This is required in order to get the theme config keys of the various apps into themes.config; this way, the routerconsole requires no knowledge of what apps support universal theming, and can just blanket apply themes to all known keys.
This commit is contained in:
@@ -47,7 +47,14 @@ public class BaseBean
|
||||
if( properties.getProperty(PRIVATE_BOOK) == null)
|
||||
properties.setProperty(PRIVATE_BOOK, DEFAULT_PRIVATE_BOOK);
|
||||
// Fetch theme
|
||||
_theme = _context.readConfigFile(THEME_CONFIG_FILE).getProperty(PROP_THEME_NAME, DEFAULT_THEME);
|
||||
Properties themeProps = _context.readConfigFile(THEME_CONFIG_FILE);
|
||||
_theme = themeProps.getProperty(PROP_THEME_NAME);
|
||||
// Ensure that theme config line exists in config file
|
||||
if (_theme == null) {
|
||||
_theme = DEFAULT_THEME;
|
||||
themeProps.put(PROP_THEME_NAME, _theme);
|
||||
_context.writeConfigFile(THEME_CONFIG_FILE, themeProps);
|
||||
}
|
||||
configLastLoaded = currentTime;
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user