From 142e0b46a14503ff45f84d3de10c0c9f25dce432 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Tue, 19 Jun 2012 10:43:18 +0100 Subject: [PATCH] Remove some unused code --- SparkleLib/SparkleChangeSet.cs | 38 +-------------------------- SparkleLib/SparkleFetcherBase.cs | 1 + SparkleLib/SparkleRepoBase.cs | 2 -- SparkleShare/SparkleControllerBase.cs | 18 ++++++------- 4 files changed, 11 insertions(+), 48 deletions(-) diff --git a/SparkleLib/SparkleChangeSet.cs b/SparkleLib/SparkleChangeSet.cs index 835c57a7..fc46a58d 100755 --- a/SparkleLib/SparkleChangeSet.cs +++ b/SparkleLib/SparkleChangeSet.cs @@ -32,49 +32,13 @@ namespace SparkleLib { public class SparkleChangeSet { public SparkleUser User = new SparkleUser ("Unknown", "Unknown"); - public SparkleFolder Folder; public string Revision; public DateTime Timestamp; public DateTime FirstTimestamp; - public bool IsMagical = false; + public bool IsMagical; public Uri RemoteUrl; - public List Changes = new List (); - - - public string RelativeTimestamp { - get { - TimeSpan time_span = DateTime.Now - Timestamp; - - if (time_span <= TimeSpan.FromSeconds (60)) - return "just now"; - - if (time_span <= TimeSpan.FromMinutes (60)) - return time_span.Minutes > 1 - ? time_span.Minutes + " minutes ago" - : "a minute ago"; - - if (time_span <= TimeSpan.FromHours (24)) - return time_span.Hours > 1 - ? time_span.Hours + " hours ago" - : "an hour ago"; - - if (time_span <= TimeSpan.FromDays (30)) - return time_span.Days > 1 - ? time_span.Days + " days ago" - : "a day ago"; - - if (time_span <= TimeSpan.FromDays (365)) - return time_span.Days > 30 - ? (time_span.Days / 30) + " months ago" - : "a month ago"; - - return time_span.Days > 365 - ? (time_span.Days / 365) + " years ago" - : "a year ago"; - } - } } diff --git a/SparkleLib/SparkleFetcherBase.cs b/SparkleLib/SparkleFetcherBase.cs index 490c962b..59a0eedf 100755 --- a/SparkleLib/SparkleFetcherBase.cs +++ b/SparkleLib/SparkleFetcherBase.cs @@ -64,6 +64,7 @@ namespace SparkleLib { } } + protected List warnings = new List (); protected List errors = new List (); diff --git a/SparkleLib/SparkleRepoBase.cs b/SparkleLib/SparkleRepoBase.cs index af5b283f..bde61fc7 100755 --- a/SparkleLib/SparkleRepoBase.cs +++ b/SparkleLib/SparkleRepoBase.cs @@ -34,8 +34,6 @@ namespace SparkleLib { } - - public abstract class SparkleRepoBase { public abstract string CurrentRevision { get; } diff --git a/SparkleShare/SparkleControllerBase.cs b/SparkleShare/SparkleControllerBase.cs index 9097f0ee..aca2bbb2 100644 --- a/SparkleShare/SparkleControllerBase.cs +++ b/SparkleShare/SparkleControllerBase.cs @@ -1141,17 +1141,17 @@ namespace SparkleShare { return link; } - } - - // All change sets that happened on a day - public class ActivityDay : List - { - public DateTime Date; - - public ActivityDay (DateTime date_time) + + // All change sets that happened on a day + private class ActivityDay : List { - Date = new DateTime (date_time.Year, date_time.Month, date_time.Day); + public DateTime Date; + + public ActivityDay (DateTime date_time) + { + Date = new DateTime (date_time.Year, date_time.Month, date_time.Day); + } } } }