Skip to content

Instantly share code, notes, and snippets.

@PulkitSethi1984
Last active May 23, 2019 00:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PulkitSethi1984/21d1ca44c3eb7c739cdb500e139ac762 to your computer and use it in GitHub Desktop.
Save PulkitSethi1984/21d1ca44c3eb7c739cdb500e139ac762 to your computer and use it in GitHub Desktop.
public class NotificationsViewModel : AppBaseViewModel
{
private readonly INotificationService _notificationService;
private readonly INotificationPresenter _presenter;
public NotificationsViewModel(INotificationPresenter presenter, INotificationService notificationService)
{
_presenter = presenter;
_notificationService = notificationService;
}
public override void OnAppearing()
{
_notificationService.NotificationsCount.Subscribe((count) =>
{
_presenter.UpdateCount();
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment