@@ -12,33 +12,22 @@ public class Commit
1212 public ulong AuthorTime { get ; set ; } = 0 ;
1313 public User Committer { get ; set ; } = User . Invalid ;
1414 public ulong CommitterTime { get ; set ; } = 0 ;
15- public string Subject { get ; set ; } = string . Empty ;
16- public string Message { get ; set ; } = string . Empty ;
15+ public int SubjectLen { get ; set ; } = 0 ;
16+ public string Body { get ; set ; } = string . Empty ;
1717 public List < string > Parents { get ; set ; } = new List < string > ( ) ;
1818 public List < Decorator > Decorators { get ; set ; } = new List < Decorator > ( ) ;
1919 public bool HasDecorators => Decorators . Count > 0 ;
2020 public bool IsMerged { get ; set ; } = false ;
2121 public Thickness Margin { get ; set ; } = new Thickness ( 0 ) ;
2222
23+ public string Subject => string . IsNullOrWhiteSpace ( Body ) ? string . Empty : Body . Substring ( 0 , SubjectLen ) ;
2324 public string AuthorTimeStr => _utcStart . AddSeconds ( AuthorTime ) . ToString ( "yyyy/MM/dd HH:mm:ss" ) ;
2425 public string CommitterTimeStr => _utcStart . AddSeconds ( CommitterTime ) . ToString ( "yyyy/MM/dd HH:mm:ss" ) ;
2526 public string AuthorTimeShortStr => _utcStart . AddSeconds ( AuthorTime ) . ToString ( "yyyy/MM/dd" ) ;
2627 public string CommitterTimeShortStr => _utcStart . AddSeconds ( CommitterTime ) . ToString ( "yyyy/MM/dd" ) ;
2728
28- public bool IsCommitterVisible
29- {
30- get => Author != Committer || AuthorTime != CommitterTime ;
31- }
32-
33- public bool IsCurrentHead
34- {
35- get => Decorators . Find ( x => x . Type is DecoratorType . CurrentBranchHead or DecoratorType . CurrentCommitHead ) != null ;
36- }
37-
38- public string FullMessage
39- {
40- get => string . IsNullOrWhiteSpace ( Message ) ? Subject : $ "{ Subject } \n \n { Message } ";
41- }
29+ public bool IsCommitterVisible => Author != Committer || AuthorTime != CommitterTime ;
30+ public bool IsCurrentHead => Decorators . Find ( x => x . Type is DecoratorType . CurrentBranchHead or DecoratorType . CurrentCommitHead ) != null ;
4231
4332 private static readonly DateTime _utcStart = new DateTime ( 1970 , 1 , 1 , 0 , 0 , 0 , DateTimeKind . Utc ) . ToLocalTime ( ) ;
4433 }
0 commit comments