Changed habit type selection to dropdown instead of popup message (#498)

This commit is contained in:
Tthecreator
2019-08-12 19:39:44 +02:00
committed by Alinson Xavier
parent ec2fa16fab
commit 3e2cf48223
8 changed files with 44 additions and 54 deletions

View File

@@ -224,16 +224,6 @@ public class Preferences
storage.putBoolean("pref_first_run", isFirstRun);
}
public boolean isNumericalHabitsFeatureEnabled()
{
return storage.getBoolean("pref_feature_numerical_habits", false);
}
public void setNumericalHabitsFeatureEnabled(boolean enabled)
{
storage.putBoolean("pref_feature_numerical_habits", enabled);
}
public boolean isPureBlackEnabled()
{
return storage.getBoolean("pref_pure_black", false);

View File

@@ -61,9 +61,14 @@ public class ListHabitsMenuBehavior
updateAdapterFilter();
}
public void onCreateHabit()
public void onCreateBooleanHabit()
{
screen.showCreateHabitScreen();
screen.showCreateBooleanHabitScreen();
}
public void onCreateNumericalHabit()
{
screen.showCreateNumericalHabitScreen();
}
public void onViewFAQ()
@@ -145,7 +150,9 @@ public class ListHabitsMenuBehavior
void showAboutScreen();
void showCreateHabitScreen();
void showCreateBooleanHabitScreen();
void showCreateNumericalHabitScreen();
void showFAQScreen();

View File

@@ -196,14 +196,6 @@ public class PreferencesTest extends BaseUnitTest
assertTrue(prefs.isShortToggleEnabled());
}
@Test
public void testNumericalHabits() throws Exception
{
assertFalse(prefs.isNumericalHabitsFeatureEnabled());
prefs.setNumericalHabitsFeatureEnabled(true);
assertTrue(prefs.isNumericalHabitsFeatureEnabled());
}
@Test
public void testDeveloper() throws Exception
{