Skip to content

Commit

Permalink
plusonelabs#236 Don't show time for All day events.
Browse files Browse the repository at this point in the history
plusonelabs#221 Display location independently of time, including showing location for All day events.
  • Loading branch information
yvolk committed Sep 4, 2019
1 parent f871437 commit 56e54e6
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,21 @@ public CalendarEvent getEvent() {
}

public String getEventTimeString() {
return hideEventDetails() ? "" : createTimeSpanString(getContext());
return hideEventTime() ? "" : createTimeSpanString(getContext());
}

private boolean hideEventTime() {
return spansOneFullDay() && !(isStartOfMultiDayEvent() || isEndOfMultiDayEvent()) ||
isAllDay();
}

String getLocationString() {
return getLocation() == null || getLocation().isEmpty() || hideEventDetails() ||
!getSettings().getShowLocation() ? "" : SPACE_PIPE_SPACE + getLocation();
return hideLocation() ? "" : SPACE_PIPE_SPACE + getLocation();
}

private boolean hideEventDetails() {
return spansOneFullDay() && !(isStartOfMultiDayEvent() || isEndOfMultiDayEvent()) ||
isAllDay() && getSettings().getFillAllDayEvents();
private boolean hideLocation() {
return getLocation() == null || getLocation().isEmpty() ||
!getSettings().getShowLocation();
}

private String createTimeSpanString(Context context) {
Expand Down

0 comments on commit 56e54e6

Please sign in to comment.