Refactor dismissNotification uses into shared logic in view_utils