mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-10-31 03:48:10 +00:00
Do not show date in commit dialog when it is now
This commit is contained in:
parent
69352ca413
commit
3b1cf73e4a
1 changed files with 12 additions and 1 deletions
|
@ -119,7 +119,18 @@ class Dialog : Gtk.Dialog
|
||||||
var email = d_author.get_email();
|
var email = d_author.get_email();
|
||||||
|
|
||||||
d_label_user.set_label(@"$name <$email>");
|
d_label_user.set_label(@"$name <$email>");
|
||||||
d_label_date.set_label((new Gitg.Date.for_date_time(d_author.get_time())).for_display());
|
|
||||||
|
var t = d_author.get_time();
|
||||||
|
var now = new DateTime.now_local();
|
||||||
|
|
||||||
|
if (now.difference(t) < TimeSpan.SECOND * 5)
|
||||||
|
{
|
||||||
|
d_label_date.set_label("");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
d_label_date.set_label((new Gitg.Date.for_date_time(t)).for_display());
|
||||||
|
}
|
||||||
|
|
||||||
var ac = Gitg.AvatarCache.default();
|
var ac = Gitg.AvatarCache.default();
|
||||||
d_cancel_avatar = new Cancellable();
|
d_cancel_avatar = new Cancellable();
|
||||||
|
|
Loading…
Reference in a new issue