Re-add support for dark themes
In the new UI, there is no concept of themes (despite it still being present in the Settings). This should not be particularly difficult and only require a minimal amount of refactoring (as themes in F-Droid are just colours, not paddings/margins/etc).
Note that this code was used in the previous version to automatically apply the themes when leaving the preferences screen:
// The automatic update settings may have changed, so reschedule (or
// unschedule) the service accordingly. It's cheap, so no need to
// check if the particular setting has actually been changed.
UpdateService.schedule(getBaseContext());
if ((resultCode & PreferencesActivity.RESULT_RESTART) != 0) {
((FDroidApp) getApplication()).reloadTheme();
final Intent intent = getIntent();
overridePendingTransition(0, 0);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
finish();
overridePendingTransition(0, 0);
startActivity(intent);
}
but it will no longer work in master
, as the preferences are not in their own activity. This will need to be reworked so that the themes are applied automatically.