Remove some unused code

This commit is contained in:
Hylke Bons 2012-06-19 10:43:18 +01:00
parent d66b8d6090
commit 142e0b46a1
4 changed files with 11 additions and 48 deletions

View file

@ -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<SparkleChange> Changes = new List<SparkleChange> ();
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";
}
}
}

View file

@ -64,6 +64,7 @@ namespace SparkleLib {
}
}
protected List<string> warnings = new List<string> ();
protected List<string> errors = new List<string> ();

View file

@ -34,8 +34,6 @@ namespace SparkleLib {
}
public abstract class SparkleRepoBase {
public abstract string CurrentRevision { get; }

View file

@ -1141,17 +1141,17 @@ namespace SparkleShare {
return link;
}
}
// All change sets that happened on a day
public class ActivityDay : List <SparkleChangeSet>
{
public DateTime Date;
public ActivityDay (DateTime date_time)
// All change sets that happened on a day
private class ActivityDay : List <SparkleChangeSet>
{
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);
}
}
}
}