Skip to content

Commit

Permalink
only send email if next 10 events get updated
Browse files Browse the repository at this point in the history
  • Loading branch information
RedyAu committed Oct 7, 2022
1 parent 0220ac2 commit 3cfce2b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/globals.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'utils/event.dart';
import 'utils/history.dart';

//TODO changeme
final String version = "4.0.2";
final String version = "4.0.3";

final Directory homeDir = Directory('RecordOnCalendar');
final File configFile = File(p.join(homeDir.path, 'config.yaml'));
Expand Down
6 changes: 4 additions & 2 deletions bin/utils/calendar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ Event? getCurrentEvent() {
Future updateICal() async {
logger.log("\n${DateTime.now().toFormattedString()} | Updating Calendar");

int nextEventsHash = events.reversed
int nextEventsHash = events
.where((element) => element.start.isAfter(DateTime.now()))
.take(10)
.join()
.hashCode;

Expand Down Expand Up @@ -131,8 +132,9 @@ Future updateICal() async {
"Exception occured while updating calendar: $e\nContinuing with already downloaded events.\n$stack");
}

int updatedNextEventsHash = events.reversed
int updatedNextEventsHash = events
.where((element) => element.start.isAfter(DateTime.now()))
.take(10)
.join()
.hashCode;

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: record_on_calendar
description: Record multitrack audio automatically according to iCal calendar events.
# Also change in utils/globals.dart
version: 4.0.2
version: 4.0.3

environment:
sdk: '>=2.16.1 <3.0.0'
Expand Down

0 comments on commit 3cfce2b

Please sign in to comment.