Merge branch 'dev' into modules

This commit is contained in:
2017-05-28 09:44:55 -04:00
8 changed files with 29 additions and 12 deletions

View File

@@ -29,7 +29,7 @@ public class BundleSavedState extends android.support.v4.view.AbsSavedState
@Override
public BundleSavedState createFromParcel(Parcel source)
{
return new BundleSavedState(source);
return new BundleSavedState(source, getClass().getClassLoader());
}
@Override
@@ -47,9 +47,9 @@ public class BundleSavedState extends android.support.v4.view.AbsSavedState
this.bundle = bundle;
}
public BundleSavedState(Parcel source)
public BundleSavedState(Parcel source, ClassLoader loader)
{
super(source);
super(source, loader);
this.bundle = source.readBundle(getClass().getClassLoader());
}

View File

@@ -40,6 +40,7 @@ import org.isoron.uhabits.preferences.*;
import butterknife.*;
import static android.view.View.*;
import static org.isoron.uhabits.activities.ThemeSwitcher.THEME_LIGHT;
public class EditHabitDialog extends AppCompatDialogFragment
{
@@ -76,7 +77,13 @@ public class EditHabitDialog extends AppCompatDialogFragment
@Override
public int getTheme()
{
return R.style.DialogWithTitle;
AppComponent component =
((HabitsApplication) getContext().getApplicationContext()).getComponent();
if(component.getPreferences().getTheme() == THEME_LIGHT)
return R.style.DialogWithTitle;
else
return R.style.DarkDialogWithTitle;
}
@Override

View File

@@ -261,7 +261,7 @@ public class SQLiteHabitList extends HabitList
}
}
protected List<Habit> toList()
protected synchronized List<Habit> toList()
{
String query = buildSelectQuery();
List<HabitRecord> recordList = sqlite.query(query, null);