Improve Google Calendar Logic

This commit is contained in:
2022-08-04 13:36:24 +02:00
parent 61d6597578
commit 0c63d45dd6
6 changed files with 60 additions and 23 deletions
@@ -74,7 +74,6 @@ public class TLWMatchdaysUpdater {
condition;
this.beautifulInfo += beautifulInfoStart +
"Tippabgabeschluss 1 zu '" + matchdayUpdated.getDeliveryDate() + "'.\n";
createOrUpdateEvent(matchdayUpdated, matchdayUpdated.getDeliveryDate(), 1);
}
if (!matchdayOriginal.getDeliveryDate2().equals(matchdayUpdated.getDeliveryDate2())) {
@@ -83,10 +82,6 @@ public class TLWMatchdaysUpdater {
condition;
this.beautifulInfo += beautifulInfoStart +
"Tippabgabeschluss 2 zu '" + matchdayUpdated.getDeliveryDate2() + "'.\n";
if(!matchdayUpdated.getDeliveryDate2().equals(""))
createOrUpdateEvent(matchdayUpdated, matchdayUpdated.getDeliveryDate2(), 2);
else
deleteEvent(matchdayUpdated, 2);
}
if (!matchdayOriginal.getMatchdayName().equals(matchdayUpdated.getMatchdayName())) {
@@ -95,9 +90,6 @@ public class TLWMatchdaysUpdater {
condition;
this.beautifulInfo += beautifulInfoStart +
"Spieltagsname zu '" + matchdayUpdated.getMatchdayName() + "'.\n";
createOrUpdateEvent(matchdayUpdated, matchdayUpdated.getDeliveryDate(), 1);
if(!matchdayUpdated.getDeliveryDate2().equals(""))
createOrUpdateEvent(matchdayUpdated, matchdayUpdated.getDeliveryDate2(), 2);
}
}
}
@@ -106,6 +98,10 @@ public class TLWMatchdaysUpdater {
return updateSql;
}
public void updateGoogleCalendar() {
updateAllMatchdays(matchdaysUpdated);
}
public String getBeautifulInfo() {
return this.beautifulInfo;
}