From e944e6500740b00c0d2195d119ba2e3c781348ca Mon Sep 17 00:00:00 2001 From: Cameron Ball Date: Tue, 1 Jan 2019 21:35:09 +0800 Subject: [PATCH] Use getString instead of getStringAndCode since the keyboard is implemented now --- src/purjolok.php | 2 +- src/tasks.php | 6 +++--- src/unfinished.php | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/purjolok.php b/src/purjolok.php index 8b823de..386596a 100644 --- a/src/purjolok.php +++ b/src/purjolok.php @@ -267,7 +267,7 @@ getTelegram()->addCommand( $this->replyWithMessage([ 'text' => ununlines([ getString('tasksForTheWeek'), - unlines(map(getStringAndCode)(array_diff($tasksForTheWeek, $completedTasks))) + unlines(map(getString)(array_diff($tasksForTheWeek, $completedTasks))) ]) ]); } diff --git a/src/tasks.php b/src/tasks.php index 5b11cc2..eb37cc7 100644 --- a/src/tasks.php +++ b/src/tasks.php @@ -14,9 +14,9 @@ $currentDayOfMonth = closest((new DateTimeImmutable())->format('d'), $mondays); $currentWeekOfMonth = closestIndex($currentDayOfMonth, $mondays) + 1; $taskLists = array_merge( - isStartOfSeason($currentMonth, $currentDayOfMonth) ? [unlines(map(getStringAndCode)(getTasksForTheSeason(getSeason($currentMonth), $taskMatrix)))] : [], - isStartOfMonth($currentDayOfMonth) ? [unlines(map(getStringAndCode)(getTasksForTheMonth($currentMonth, $taskMatrix)))] : [], - [unlines(map(getStringAndCode)(getTasksForTheWeek($currentWeekOfMonth, $currentMonth, $taskMatrix)))] + isStartOfSeason($currentMonth, $currentDayOfMonth) ? [unlines(map(getString)(getTasksForTheSeason(getSeason($currentMonth), $taskMatrix)))] : [], + isStartOfMonth($currentDayOfMonth) ? [unlines(map(getString)(getTasksForTheMonth($currentMonth, $taskMatrix)))] : [], + [unlines(map(getString)(getTasksForTheWeek($currentWeekOfMonth, $currentMonth, $taskMatrix)))] ); $taskMessages = [ diff --git a/src/unfinished.php b/src/unfinished.php index de7b5b8..8c7369d 100644 --- a/src/unfinished.php +++ b/src/unfinished.php @@ -49,10 +49,10 @@ $unfinishedForWeek = array_diff( //EOY => (EOM & EOW) & !EOSx //EOS => (EOM & EOW) & !EOY $taskLists = array_merge( - isEndOfYear($currentYear, $currentMonth, $currentDayOfMonth) ? [unlines(map(getStringAndCode)($unfinishedForYear))] : [], - isEndOfSeason($currentYear, $currentMonth, $currentDayOfMonth) ? [unlines(map(getStringAndCode)($unfinishedForSeason))] : [], - isEndOfMonth($currentYear, $currentMonth, $currentDayOfMonth) ? [unlines(map(getStringAndCode)($unfinishedForMonth))] : [], - [unlines(map(getStringAndCode)($unfinishedForWeek))] + isEndOfYear($currentYear, $currentMonth, $currentDayOfMonth) ? [unlines(map(getString)($unfinishedForYear))] : [], + isEndOfSeason($currentYear, $currentMonth, $currentDayOfMonth) ? [unlines(map(getString)($unfinishedForSeason))] : [], + isEndOfMonth($currentYear, $currentMonth, $currentDayOfMonth) ? [unlines(map(getString)($unfinishedForMonth))] : [], + [unlines(map(getString)($unfinishedForWeek))] ); $seasonName = ucfirst($currentSeason); -- 2.11.0