repo: Fix crash due to last timestamp being empty when adding a new empty project
This commit is contained in:
parent
5cd196dad0
commit
175ab1fcbc
|
@ -88,7 +88,15 @@ namespace SparkleLib {
|
||||||
public bool IsBuffering { get; private set; }
|
public bool IsBuffering { get; private set; }
|
||||||
public double ProgressPercentage { get; private set; }
|
public double ProgressPercentage { get; private set; }
|
||||||
public double ProgressSpeed { get; private set; }
|
public double ProgressSpeed { get; private set; }
|
||||||
public DateTime LastSync { get { return ChangeSets [0].Timestamp; }}
|
|
||||||
|
public DateTime LastSync {
|
||||||
|
get {
|
||||||
|
if (ChangeSets != null && ChangeSets.Count > 0)
|
||||||
|
return ChangeSets [0].Timestamp;
|
||||||
|
else
|
||||||
|
return DateTime.MinValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public virtual string Identifier {
|
public virtual string Identifier {
|
||||||
get {
|
get {
|
||||||
|
|
|
@ -46,7 +46,10 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public string StatusMessage {
|
public string StatusMessage {
|
||||||
get {
|
get {
|
||||||
string status_message = string.Format ("Synced {0}", this.repo.LastSync.ToPrettyDate ());
|
string status_message = "Waiting to sync";
|
||||||
|
|
||||||
|
if (!this.repo.LastSync.Equals (DateTime.MinValue))
|
||||||
|
status_message = string.Format ("Synced {0}", this.repo.LastSync.ToPrettyDate ());
|
||||||
|
|
||||||
if (this.repo.Status == SyncStatus.SyncUp)
|
if (this.repo.Status == SyncStatus.SyncUp)
|
||||||
status_message = "Sending changes… " + this.repo.ProgressPercentage + "%";
|
status_message = "Sending changes… " + this.repo.ProgressPercentage + "%";
|
||||||
|
|
|
@ -1,16 +1,8 @@
|
||||||
Points of contact:
|
Maintainer:
|
||||||
|
|
||||||
Maintainer:
|
|
||||||
Hylke Bons <hylkebons@gmail.com>
|
Hylke Bons <hylkebons@gmail.com>
|
||||||
|
|
||||||
Marketing:
|
Contributors:
|
||||||
Alexandre Saiz Verdaguer <alex@sparkleshare.net>
|
|
||||||
|
|
||||||
Translations:
|
|
||||||
Łukasz Jernaś <deejay1@srem.org>
|
|
||||||
|
|
||||||
|
|
||||||
Code:
|
|
||||||
|
|
||||||
Alejandro Serrano <trupill@gmail.com>
|
Alejandro Serrano <trupill@gmail.com>
|
||||||
Alexandre Saiz Verdaguer <a@alexandresaiz.com>
|
Alexandre Saiz Verdaguer <a@alexandresaiz.com>
|
||||||
|
@ -40,14 +32,13 @@ Code:
|
||||||
Travis Glenn Hansen <travisghansen@yahoo.com>
|
Travis Glenn Hansen <travisghansen@yahoo.com>
|
||||||
Vincent Untz <vuntz@gnome.org>
|
Vincent Untz <vuntz@gnome.org>
|
||||||
Will Thompson <will@willthompson.co.uk>
|
Will Thompson <will@willthompson.co.uk>
|
||||||
|
|
||||||
|
Designers:
|
||||||
Artwork:
|
|
||||||
|
|
||||||
Andreas Nilsson <andreasn@gnome.org>
|
Andreas Nilsson <andreasn@gnome.org>
|
||||||
Jakub Steiner <jimmac@redhat.com>
|
Jakub Steiner <jimmac@redhat.com>
|
||||||
Hylke Bons <hylkebons@gmail.com>
|
Hylke Bons <hylkebons@gmail.com>
|
||||||
Lapo Calamandrei <calamandrei@gmail.com>
|
Lapo Calamandrei <calamandrei@gmail.com>
|
||||||
|
|
||||||
|
|
||||||
Thanks very much!
|
Thanks very much!
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue