replacing getDescription with getQuestion all over the code

This commit is contained in:
Rechee
2020-01-07 20:39:23 -08:00
parent 0ec604f21e
commit fb98c5fe9a
12 changed files with 25 additions and 25 deletions

View File

@@ -96,25 +96,25 @@ public class BaseUserInterfaceTest
Habit h1 = fixtures.createEmptyHabit();
h1.setName("Wake up early");
h1.setDescription("Did you wake up early today?");
h1.setQuestion("Did you wake up early today?");
h1.setColor(5);
habitList.update(h1);
Habit h2 = fixtures.createShortHabit();
h2.setName("Track time");
h2.setDescription("Did you track your time?");
h2.setQuestion("Did you track your time?");
h2.setColor(5);
habitList.update(h2);
Habit h3 = fixtures.createLongHabit();
h3.setName("Meditate");
h3.setDescription("Did meditate today?");
h3.setQuestion("Did meditate today?");
h3.setColor(10);
habitList.update(h3);
Habit h4 = fixtures.createEmptyHabit();
h4.setName("Read books");
h4.setDescription("Did you read books today?");
h4.setQuestion("Did you read books today?");
h4.setColor(2);
habitList.update(h4);
}

View File

@@ -52,7 +52,7 @@ public class HabitFixtures
{
Habit habit = modelFactory.buildHabit();
habit.setName("Meditate");
habit.setDescription("Did you meditate this morning?");
habit.setQuestion("Did you meditate this morning?");
habit.setColor(5);
habit.setFrequency(Frequency.DAILY);
habit.setId(id);
@@ -81,7 +81,7 @@ public class HabitFixtures
{
Habit habit = modelFactory.buildHabit();
habit.setName("Take a walk");
habit.setDescription("How many steps did you walk today?");
habit.setQuestion("How many steps did you walk today?");
habit.setType(Habit.NUMBER_HABIT);
habit.setTargetType(Habit.AT_LEAST);
habit.setTargetValue(200.0);
@@ -103,7 +103,7 @@ public class HabitFixtures
{
Habit habit = modelFactory.buildHabit();
habit.setName("Wake up early");
habit.setDescription("Did you wake up before 6am?");
habit.setQuestion("Did you wake up before 6am?");
habit.setFrequency(new Frequency(2, 3));
habitList.add(habit);

View File

@@ -64,7 +64,7 @@ public class SubtitleCard extends HabitCard
if (habit.hasReminder()) updateReminderText(habit.getReminder());
if (habit.getDescription().isEmpty()) questionLabel.setVisibility(GONE);
if (habit.getQuestion().isEmpty()) questionLabel.setVisibility(GONE);
invalidate();
}

View File

@@ -115,7 +115,7 @@ class AndroidNotificationTray
val builder = NotificationCompat.Builder(context, REMINDERS_CHANNEL_ID)
.setSmallIcon(R.drawable.ic_notification)
.setContentTitle(habit.name)
.setContentText(if(habit.description.isNullOrBlank()) defaultText else habit.description)
.setContentText(if(habit.question.isBlank()) defaultText else habit.question)
.setContentIntent(pendingIntents.showHabit(habit))
.setDeleteIntent(pendingIntents.dismissNotification(habit))
.addAction(addRepetitionAction)