mirror of
https://github.com/TakeV-Lambda/Tooth.git
synced 2024-11-21 22:44:25 +00:00
fix(Lists): don't show spinner if there's no results
This commit is contained in:
parent
8c908a05a7
commit
b7155df0ce
2 changed files with 17 additions and 14 deletions
|
@ -279,7 +279,7 @@ public class Tooth.Views.Lists : Views.Timeline {
|
|||
|
||||
public Lists () {
|
||||
Object (
|
||||
url: @"/api/v1/lists",
|
||||
url: @"/api/v1/lists",
|
||||
label: _("Lists"),
|
||||
icon: "tooth-list-compact-symbolic"
|
||||
);
|
||||
|
@ -343,6 +343,7 @@ public class Tooth.Views.Lists : Views.Timeline {
|
|||
}
|
||||
|
||||
public override void on_request_finish () {
|
||||
base.on_request_finish ();
|
||||
on_content_changed ();
|
||||
}
|
||||
|
||||
|
|
|
@ -80,23 +80,25 @@ public class Tooth.Views.Timeline : AccountHolder, Streamable, Views.ContentBase
|
|||
return req;
|
||||
}
|
||||
|
||||
public virtual void on_request_finish () {}
|
||||
public virtual void on_request_finish () {
|
||||
status_loading = false;
|
||||
}
|
||||
|
||||
public virtual bool request () {
|
||||
var req = append_params (new Request.GET (get_req_url ()))
|
||||
.with_account (account)
|
||||
.with_ctx (this)
|
||||
.then ((sess, msg) => {
|
||||
Network.parse_array (msg, node => {
|
||||
var e = entity_cache.lookup_or_insert (node, accepts);
|
||||
model.append (e); //FIXME: use splice();
|
||||
});
|
||||
.with_account (account)
|
||||
.with_ctx (this)
|
||||
.then ((sess, msg) => {
|
||||
Network.parse_array (msg, node => {
|
||||
var e = entity_cache.lookup_or_insert (node, accepts);
|
||||
model.append (e); //FIXME: use splice();
|
||||
});
|
||||
|
||||
get_pages (msg.response_headers.get_one ("Link"));
|
||||
on_content_changed ();
|
||||
on_request_finish ();
|
||||
})
|
||||
.on_error (on_error);
|
||||
get_pages (msg.response_headers.get_one ("Link"));
|
||||
on_content_changed ();
|
||||
on_request_finish ();
|
||||
})
|
||||
.on_error (on_error);
|
||||
req.exec ();
|
||||
|
||||
return GLib.Source.REMOVE;
|
||||
|
|
Loading…
Reference in a new issue