Skip to content
This repository has been archived by the owner on Jul 2, 2022. It is now read-only.

Commit

Permalink
2.1.0-RC2
Browse files Browse the repository at this point in the history
  • Loading branch information
thedillonb committed Jan 3, 2014
1 parent a8bb352 commit 8ba8713
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
13 changes: 12 additions & 1 deletion CodeHub.Core/ViewModels/Issues/IssueLabelsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ namespace CodeHub.Core.ViewModels.Issues
{
public class IssueLabelsViewModel : LoadableViewModel
{
private IEnumerable<LabelModel> _originalLables;

private bool _isSaving;
public bool IsSaving
{
Expand Down Expand Up @@ -48,7 +50,9 @@ public void Init(NavObject navObject)
Repository = navObject.Repository;
Id = navObject.Id;
SaveOnSelect = navObject.SaveOnSelect;
SelectedLabels.Items.Reset(GetService<CodeFramework.Core.Services.IViewModelTxService>().Get() as IEnumerable<LabelModel>);

_originalLables = GetService<CodeFramework.Core.Services.IViewModelTxService>().Get() as IEnumerable<LabelModel>;
SelectedLabels.Items.Reset(_originalLables);
}

public ICommand SaveLabelChoices
Expand All @@ -58,6 +62,13 @@ public ICommand SaveLabelChoices

private async Task SelectLabels(IEnumerable<LabelModel> x)
{
//If nothing has changed, dont do anything...
if (_originalLables != null && _originalLables.Intersect(x).Count() == _originalLables.Count())
{
ChangePresentation(new MvxClosePresentationHint(this));
return;
}

if (SaveOnSelect)
{
try
Expand Down
10 changes: 5 additions & 5 deletions CodeHub.iOS/Setup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ protected override Assembly[] GetViewModelAssemblies()
list.Add(typeof(BaseStartupViewModel).Assembly);
return list.ToArray();
}
//
// protected override IMvxTrace CreateDebugTrace()
// {
// return new ;
// }

protected override Cirrious.CrossCore.Platform.IMvxTrace CreateDebugTrace()
{
return new Cirrious.CrossCore.Platform.MvxDebugOnlyTrace();
}

protected override void FillBindingNames(IMvxBindingNameRegistry obj)
{
Expand Down
3 changes: 1 addition & 2 deletions CodeHub.iOS/Views/Issues/IssueView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,8 @@ public void RenderIssue()
};
labelsElement.Tapped += () => ViewModel.GoToLabelsCommand.Execute(null);


secDetails.Add(milestoneElement);
secDetails.Add(assigneeElement);
secDetails.Add(milestoneElement);
secDetails.Add(labelsElement);
root.Add(secDetails);

Expand Down

0 comments on commit 8ba8713

Please sign in to comment.