Skip to content

Commit

Permalink
Fixes default value in properties with custom get accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
birros committed Oct 2, 2018
1 parent 9db7916 commit c82b2be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/app/states/route-state.vala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class WebArchives.RouteState : Object {
}

public Route last_route {get; private set;}
private Route _route {get; private set;}
private Route _route {get; private set; default = Route.HOME;}
public Route route {
get {
return _route;
Expand All @@ -20,6 +20,5 @@ public class WebArchives.RouteState : Object {
_route = value;
}
}
default = Route.HOME;
}
}
3 changes: 1 addition & 2 deletions src/app/ui/content/status-label.vala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
public class WebArchives.StatusLabel : Gtk.Label {
private int64 _timestamp;
private int64 _timestamp {get; set; default = 0;}
public int64 timestamp {
get {
return _timestamp;
Expand All @@ -9,7 +9,6 @@ public class WebArchives.StatusLabel : Gtk.Label {
update_label ();
update_tooltip ();
}
default = 0;
}

public bool progress_enabled {get; set; default = false;}
Expand Down

0 comments on commit c82b2be

Please sign in to comment.