This repository was archived by the owner on Jul 2, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +39
-5
lines changed
CodeHub.Core/ViewModels/Organizations
ViewControllers/Organizations Expand file tree Collapse file tree 4 files changed +39
-5
lines changed Original file line number Diff line number Diff line change 1
- using System . Windows . Input ;
2
- using MvvmCross . Core . ViewModels ;
3
- using CodeHub . Core . ViewModels ;
4
- using CodeHub . Core . ViewModels . User ;
5
1
using GitHubSharp . Models ;
6
2
using System . Threading . Tasks ;
7
3
Original file line number Diff line number Diff line change 331
331
<Compile Include =" ViewControllers\Events\UserEventsViewController.cs" />
332
332
<Compile Include =" Views\Issues\IssueLabelsView.cs" />
333
333
<Compile Include =" Views\RetryListView.cs" />
334
+ <Compile Include =" ViewControllers\Organizations\TeamsViewController.cs" />
334
335
</ItemGroup >
335
336
<ItemGroup >
336
337
<Reference Include =" System" />
Original file line number Diff line number Diff line change 69
69
<string >UIInterfaceOrientationLandscapeRight </string >
70
70
</array >
71
71
<key >CFBundleVersion </key >
72
- <string >2.11.0.0 </string >
72
+ <string >2.11.0.2 </string >
73
73
<key >UILaunchStoryboardName </key >
74
74
<string >Launch </string >
75
75
<key >NSAppTransportSecurity </key >
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments