* called when the current profile has changed
*/
private void onProfileChanged(@Nullable Profile newProfile) {
- if (this.profile == null) {
- if (newProfile == null)
- return;
- }
- else {
+ if (this.profile != null) {
if (this.profile.equals(newProfile))
return;
}
else
setTitle(R.string.app_name);
- int newProfileTheme = haveProfile ? newProfile.getTheme() : -1;
+ int newProfileTheme = haveProfile ? newProfile.getTheme() : Colors.DEFAULT_HUE_DEG;
if (newProfileTheme != Colors.profileThemeId) {
Logger.debug("profiles",
String.format(Locale.ENGLISH, "profile theme %d → %d", Colors.profileThemeId,
Logger.debug(TAG, "account filter changed, reloading transactions");
// mainModel.scheduleTransactionListReload();
LiveData<List<TransactionWithAccounts>> transactions =
- new MutableLiveData<>(new ArrayList<TransactionWithAccounts>());
+ new MutableLiveData<>(new ArrayList<>());
if (profile != null) {
if (accFilter == null || accFilter.isEmpty()) {
transactions = DB.get()