public IssuesFilterViewController(
            string username, string repository,
            IssuesFilterModel currentFilter, Action <IssuesFilterModel> searchAction)
        {
            _currentFilter = currentFilter.Clone();
            _searchAction  = searchAction;

            OnActivation(disposable =>
            {
                _milestoneElement
                .Clicked
                .Select(_ =>
                {
                    var vc = new IssueMilestonesViewController(username, repository);
                    vc.ViewModel.SelectedValue = _currentFilter.Milestone;
                    vc.ViewModel.WhenAnyValue(x => x.SelectedValue)
                    .Subscribe(x => _currentFilter.Milestone = x);
                    return(vc);
                })
                .Subscribe(x => NavigationController.PushViewController(x, true))
                .AddTo(disposable);

                _verisonElement
                .Clicked
                .Select(_ =>
                {
                    var vc = new IssueVersionsViewController(username, repository);
                    vc.ViewModel.SelectedValue = _currentFilter.Version;
                    vc.ViewModel.WhenAnyValue(x => x.SelectedValue)
                    .Subscribe(x => _currentFilter.Version = x);
                    return(vc);
                })
                .Subscribe(x => NavigationController.PushViewController(x, true))
                .AddTo(disposable);

                _componentElement
                .Clicked
                .Select(_ =>
                {
                    var vc = new IssueComponentsViewController(username, repository);
                    vc.ViewModel.SelectedValue = _currentFilter.Component;
                    vc.ViewModel.WhenAnyValue(x => x.SelectedValue)
                    .Subscribe(x => _currentFilter.Component = x);
                    return(vc);
                })
                .Subscribe(x => NavigationController.PushViewController(x, true))
                .AddTo(disposable);
            });
        }
        public IssuesFilterViewController(IssuesFilterModel currentFilter)
        {
            _currentFilter = currentFilter.Clone();
            Style          = UITableViewStyle.Grouped;
            Title          = "Filter & Sort";
            NavigationItem.RightBarButtonItem = new UIBarButtonItem(Theme.CurrentTheme.SaveButton, UIBarButtonItemStyle.Plain, (s, e) => {
                if (string.IsNullOrEmpty(_filterName.Value))
                {
                    MonoTouch.Utilities.ShowAlert("Filter Name", "You must name your filter!");
                    return;
                }

                CreatedFilterModel(CreateFilterModel());
                NavigationController.PopViewController(true);
            });
        }
 public IssuesFilterViewController(IssuesFilterModel currentFilter)
 {
     _currentFilter = currentFilter.Clone();
     Title = "Filter & Sort";
 }
 public IssuesFilterViewController(IssuesFilterModel currentFilter)
 {
     _currentFilter = currentFilter.Clone();
     Title          = "Filter & Sort";
 }