MOBILE-3087 calendar: Fix offline events not displayed in upcoming events page

This commit is contained in:
Albert Gasset 2019-08-09 13:09:07 +02:00
parent 56d8aba3b4
commit e217234f9e
2 changed files with 2 additions and 2 deletions

View File

@ -264,7 +264,7 @@ export class AddonCalendarUpcomingEventsComponent implements OnInit, OnChanges,
return this.onlineEvents; return this.onlineEvents;
} }
const start = Date.now(), const start = Date.now() / 1000,
end = start + (CoreConstants.SECONDS_DAY * this.lookAhead); end = start + (CoreConstants.SECONDS_DAY * this.lookAhead);
let result = this.onlineEvents; let result = this.onlineEvents;

View File

@ -727,7 +727,7 @@ export class AddonCalendarProvider {
return this.userProvider.getUserPreference('calendar_lookahead').catch((error) => { return this.userProvider.getUserPreference('calendar_lookahead').catch((error) => {
// Ignore errors. // Ignore errors.
}).then((value): any => { }).then((value): any => {
if (typeof value != 'undefined') { if (value != null) {
return value; return value;
} }