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 double ProgressPercentage { 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 {
|
||||
get {
|
||||
|
|
|
@ -46,7 +46,10 @@ namespace SparkleShare {
|
|||
|
||||
public string StatusMessage {
|
||||
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)
|
||||
status_message = "Sending changes… " + this.repo.ProgressPercentage + "%";
|
||||
|
|
|
@ -1,16 +1,8 @@
|
|||
Points of contact:
|
||||
|
||||
Maintainer:
|
||||
|
||||
Hylke Bons <hylkebons@gmail.com>
|
||||
|
||||
Marketing:
|
||||
Alexandre Saiz Verdaguer <alex@sparkleshare.net>
|
||||
|
||||
Translations:
|
||||
Łukasz Jernaś <deejay1@srem.org>
|
||||
|
||||
|
||||
Code:
|
||||
Contributors:
|
||||
|
||||
Alejandro Serrano <trupill@gmail.com>
|
||||
Alexandre Saiz Verdaguer <a@alexandresaiz.com>
|
||||
|
@ -41,13 +33,12 @@ Code:
|
|||
Vincent Untz <vuntz@gnome.org>
|
||||
Will Thompson <will@willthompson.co.uk>
|
||||
|
||||
|
||||
Artwork:
|
||||
Designers:
|
||||
|
||||
Andreas Nilsson <andreasn@gnome.org>
|
||||
Jakub Steiner <jimmac@redhat.com>
|
||||
Hylke Bons <hylkebons@gmail.com>
|
||||
Lapo Calamandrei <calamandrei@gmail.com>
|
||||
|
||||
|
||||
Thanks very much!
|
||||
|
||||
|
|
Loading…
Reference in a new issue