@@ -72,7 +72,7 @@ public class Tuba.InstanceAccount : API.Account, Streamable {
7272 gather_instance_info ();
7373 gather_instance_custom_emojis ();
7474 check_announcements ();
75- init_notifications ();
75+ check_notifications ();
7676 }
7777
7878 construct {
@@ -357,7 +357,6 @@ public class Tuba.InstanceAccount : API.Account, Streamable {
357357 public int unread_count { get ; set ; default = 0 ; }
358358 public int last_read_id { get ; set ; default = 0 ; }
359359 public int last_received_id { get ; set ; default = 0 ; }
360- private bool passed_init_notifications = false ;
361360
362361 public class StatusContentType : Object {
363362 public string mime { get ; construct set ; }
@@ -482,9 +481,7 @@ public class Tuba.InstanceAccount : API.Account, Streamable {
482481 }
483482
484483 public void init_notifications () {
485- if (passed_init_notifications) return ;
486-
487- new Request .GET (" /api/v1/notifications" )
484+ new Request .GET (@" /api/v1/notifications$(Views.Notifications.get_notifications_excluded_types_query_param ())" )
488485 .with_account (this )
489486 .with_param (" min_id" , last_read_id. to_string ())
490487 .then ((in_stream) = > {
@@ -496,7 +493,6 @@ public class Tuba.InstanceAccount : API.Account, Streamable {
496493 last_received_id = int . parse (array. get_object_element (0 ). get_string_member_with_default (" id" , " -1" ));
497494 }
498495 }
499- passed_init_notifications = true ;
500496 })
501497 .exec ();
502498 }
@@ -510,7 +506,7 @@ public class Tuba.InstanceAccount : API.Account, Streamable {
510506 if (! root. has_member (" notifications" )) return ;
511507 var notifications = root. get_object_member (" notifications" );
512508 last_read_id = int . parse (notifications. get_string_member_with_default (" last_read_id" , " -1" ));
513- if ( ! passed_init_notifications) init_notifications ();
509+ init_notifications ();
514510 })
515511 .exec ();
516512 }
0 commit comments