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

Commit 73e9b3a

Browse files
committed
Bumped Version & Fixed Teams View
1 parent c8b623e commit 73e9b3a

File tree

4 files changed

+39
-5
lines changed

4 files changed

+39
-5
lines changed

CodeHub.Core/ViewModels/Organizations/TeamsViewModel.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
using System.Windows.Input;
2-
using MvvmCross.Core.ViewModels;
3-
using CodeHub.Core.ViewModels;
4-
using CodeHub.Core.ViewModels.User;
51
using GitHubSharp.Models;
62
using System.Threading.Tasks;
73

CodeHub.iOS/CodeHub.iOS.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@
331331
<Compile Include="ViewControllers\Events\UserEventsViewController.cs" />
332332
<Compile Include="Views\Issues\IssueLabelsView.cs" />
333333
<Compile Include="Views\RetryListView.cs" />
334+
<Compile Include="ViewControllers\Organizations\TeamsViewController.cs" />
334335
</ItemGroup>
335336
<ItemGroup>
336337
<Reference Include="System" />

CodeHub.iOS/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<string>UIInterfaceOrientationLandscapeRight</string>
7070
</array>
7171
<key>CFBundleVersion</key>
72-
<string>2.11.0.0</string>
72+
<string>2.11.0.2</string>
7373
<key>UILaunchStoryboardName</key>
7474
<string>Launch</string>
7575
<key>NSAppTransportSecurity</key>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using System;
2+
using CodeHub.Core.ViewModels.Organizations;
3+
using CodeHub.iOS.DialogElements;
4+
using CodeHub.iOS.ViewControllers.Users;
5+
using CodeHub.iOS.Views;
6+
using UIKit;
7+
8+
namespace CodeHub.iOS.ViewControllers.Organizations
9+
{
10+
public class TeamsViewController : ViewModelCollectionDrivenDialogViewController
11+
{
12+
public TeamsViewController()
13+
{
14+
Title = "Teams";
15+
EmptyView = new Lazy<UIView>(() =>
16+
new EmptyListView(Octicon.Organization.ToEmptyListImage(), "There are no teams."));
17+
}
18+
19+
public override void ViewDidLoad()
20+
{
21+
base.ViewDidLoad();
22+
23+
var vm = (TeamsViewModel)ViewModel;
24+
var weakVm = new WeakReference<TeamsViewController>(this);
25+
26+
this.BindCollection(vm.Teams, x =>
27+
{
28+
var e = new StringElement(x.Name);
29+
e.Clicked.Subscribe(_ => {
30+
var vc = UsersViewController.CreateTeamMembersViewController((int)x.Id);
31+
weakVm.Get()?.NavigationController.PushViewController(vc, true);
32+
});
33+
return e;
34+
});
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)