aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Services/TimelineService.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-08-27 01:13:31 +0800
committercrupest <crupest@outlook.com>2020-08-27 01:13:31 +0800
commit35f6584f47676353733f1cc9182d84ed4ded5cbc (patch)
tree45d959bc12082a8b4f6b084697030b34517707d1 /Timeline/Services/TimelineService.cs
parent7a974f5284f19e7b2248f633bcbd5e263aeddf81 (diff)
downloadtimeline-35f6584f47676353733f1cc9182d84ed4ded5cbc.tar.gz
timeline-35f6584f47676353733f1cc9182d84ed4ded5cbc.tar.bz2
timeline-35f6584f47676353733f1cc9182d84ed4ded5cbc.zip
Timeline title feature.
Diffstat (limited to 'Timeline/Services/TimelineService.cs')
-rw-r--r--Timeline/Services/TimelineService.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/Timeline/Services/TimelineService.cs b/Timeline/Services/TimelineService.cs
index 01f7f5fd..2f0bf2c5 100644
--- a/Timeline/Services/TimelineService.cs
+++ b/Timeline/Services/TimelineService.cs
@@ -405,11 +405,14 @@ namespace Timeline.Services
members.Add(await _userService.GetUserById(memberEntity.UserId));
}
+ var name = entity.Name ?? ("@" + owner.Username);
+
return new Models.Timeline
{
UniqueID = entity.UniqueId,
- Name = entity.Name ?? ("@" + owner.Username),
+ Name = name,
NameLastModified = entity.NameLastModified,
+ Title = string.IsNullOrEmpty(entity.Title) ? name : entity.Title,
Description = entity.Description ?? "",
Owner = owner,
Visibility = entity.Visibility,
@@ -834,6 +837,12 @@ namespace Timeline.Services
var changed = false;
+ if (newProperties.Title != null)
+ {
+ changed = true;
+ timelineEntity.Title = newProperties.Title;
+ }
+
if (newProperties.Description != null)
{
changed = true;