mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-03 02:09:15 +02:00
fixed CustomName whitespace
This commit is contained in:
@@ -43,7 +43,7 @@ func (icalModel IcalModel) EmitICal() goics.Componenter {
|
||||
|
||||
func replaceNameIfUserDefined(name string, mapping []model.FeedCollection) string {
|
||||
for _, mapEntry := range mapping {
|
||||
if mapEntry.Name == name {
|
||||
if mapEntry.Name == name && !functions.OnlyWhitespace(mapEntry.UserDefinedName) {
|
||||
return mapEntry.UserDefinedName
|
||||
}
|
||||
}
|
||||
@@ -53,13 +53,13 @@ func replaceNameIfUserDefined(name string, mapping []model.FeedCollection) strin
|
||||
func generateDescription(event *model.Event) string {
|
||||
var description string
|
||||
|
||||
if !functions.CheckIfOnlyWhitespace(event.Notes) {
|
||||
if !functions.OnlyWhitespace(event.Notes) {
|
||||
description += "Notizen: " + event.Notes + "\n"
|
||||
}
|
||||
if !functions.CheckIfOnlyWhitespace(event.Prof) {
|
||||
if !functions.OnlyWhitespace(event.Prof) {
|
||||
description += "Prof: " + event.Prof + "\n"
|
||||
}
|
||||
if !functions.CheckIfOnlyWhitespace(event.Course) {
|
||||
if !functions.OnlyWhitespace(event.Course) {
|
||||
description += "Gruppe: " + event.Course + "\n"
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user