private bool onFriendsServiceInitialized(FriendsServiceEvents.FriendsServiceInitialized evt) { notificationBreadcrumbController.ResetBreadcrumbs(friendAddedBreadcrumb); notificationBreadcrumbController.ResetBreadcrumbs(friendRequestBreadcrumb); int count = FriendsDataModelService.IncomingInvitationsList.Count; if (count > 0) { notificationBreadcrumbController.AddBreadcrumb(friendRequestBreadcrumb, count); } dataEntityCollection.EventDispatcher.AddListener <DataEntityEvents.ComponentAddedEvent <FriendData> >(onFriendComponentAdded); dataEntityCollection.EventDispatcher.AddListener <DataEntityEvents.ComponentAddedEvent <IncomingFriendInvitationData> >(onIncomingFriendInvitationComponentAdded); return(false); }
private void onBreadcrumbAdded(string breadcrumbId, int count) { if (breadcrumbId == Breadcrumb.Id) { notificationBreadcrumbController.ResetBreadcrumbs(Breadcrumb); } }
private void OnEnable() { notificationBreadcrumbController = Service.Get <NotificationBreadcrumbController>(); notificationBreadcrumbController.ResetBreadcrumbs(Breadcrumb); NotificationBreadcrumbController obj = notificationBreadcrumbController; obj.OnBreadcrumbAdded = (Action <string, int>)Delegate.Combine(obj.OnBreadcrumbAdded, new Action <string, int>(onBreadcrumbAdded)); }