-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0650b1b
commit 41ccb29
Showing
5 changed files
with
19 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,13 +47,17 @@ public void deleteSchedule(String groupId) { | |
public boolean isLessonsEndToday(String groupId, int subgroup) { | ||
DateTime currentTime = new DateTime(); | ||
Lesson[] lessons = mScheduleDatabase.getLessonsOfDay(groupId, DateTime.now(), subgroup); | ||
Lesson lesson = lessons[lessons.length - 1]; | ||
if (lessons.length > 0) { | ||
Lesson lesson = lessons[lessons.length - 1]; | ||
|
||
DateTimeFormatter formatter = DateTimeFormat.forPattern("HH:mm"); | ||
DateTimeFormatter formatter = DateTimeFormat.forPattern("HH:mm"); | ||
DateTime dt = formatter.parseDateTime(getFinishTimeOfLesson(lesson)); | ||
if (currentTime.getHourOfDay() + 1 > dt.getHourOfDay()) { | ||
return true; | ||
} | ||
} else { | ||
return true; | ||
} | ||
return false; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
v-grishechko
Author
Member
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ultimate39 До этой строки не дойдет выполнение. Ты до этого в
if
else
в обоих случаях возвращаешьtrue
. Тогда тут и самif
не нужен получается.