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

Commit 170181a

Browse files
committed
More unnecessary files
1 parent 2a89523 commit 170181a

File tree

3 files changed

+17
-77
lines changed

3 files changed

+17
-77
lines changed

CodeHub.iOS/CodeHub.iOS.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@
238238
<Compile Include="Elements\MilestoneElement.cs" />
239239
<Compile Include="Elements\NewsFeedElement.cs" />
240240
<Compile Include="Elements\RepositoryElement.cs" />
241-
<Compile Include="Elements\UserElement.cs" />
242241
<Compile Include="Elements\WebElement.cs" />
243242
<Compile Include="Services\AccountPreferencesService.cs" />
244243
<Compile Include="Services\AlertDialogService.cs" />

CodeHub.iOS/Elements/UserElement.cs

Lines changed: 0 additions & 65 deletions
This file was deleted.

CodeHub.iOS/Views/Accounts/AddAccountView.cs

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ namespace CodeHub.iOS.Views.Accounts
1313
{
1414
public partial class AddAccountView : MvxViewController
1515
{
16-
private readonly IHud _hud;
17-
1816
public new AddAccountViewModel ViewModel
1917
{
2018
get { return (AddAccountViewModel) base.ViewModel; }
@@ -24,28 +22,29 @@ public partial class AddAccountView : MvxViewController
2422
public AddAccountView()
2523
: base("AddAccountView", null)
2624
{
27-
Title = "Login".t();
28-
NavigationItem.LeftBarButtonItem = new UIBarButtonItem(Theme.CurrentTheme.BackButton, UIBarButtonItemStyle.Plain, (s, e) => NavigationController.PopViewController(true));
29-
_hud = this.CreateHud();
3025
}
3126

3227
public override void ViewDidLoad()
3328
{
29+
base.ViewDidLoad();
30+
31+
var hud = this.CreateHud();
32+
33+
Title = "Login";
34+
3435
var set = this.CreateBindingSet<AddAccountView, AddAccountViewModel>();
3536
set.Bind(User).To(x => x.Username);
3637
set.Bind(Password).To(x => x.Password);
3738
set.Bind(Domain).To(x => x.Domain);
38-
set.Bind(LoginButton).To(x => x.LoginCommand);
39-
set.Apply();
40-
41-
base.ViewDidLoad();
39+
set.Bind(LoginButton).To(x => x.LoginCommand);
40+
set.Apply();
4241

4342
ViewModel.Bind(x => x.IsLoggingIn, x =>
4443
{
4544
if (x)
46-
_hud.Show("Logging in...");
45+
hud.Show("Logging in...");
4746
else
48-
_hud.Hide();
47+
hud.Hide();
4948
});
5049

5150
View.BackgroundColor = UIColor.FromRGB(239, 239, 244);
@@ -105,6 +104,13 @@ public override void ViewWillAppear(bool animated)
105104
base.ViewWillAppear(animated);
106105
_hideNotification = NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillHideNotification, OnKeyboardNotification);
107106
_showNotification = NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillShowNotification, OnKeyboardNotification);
107+
NavigationItem.LeftBarButtonItem = new UIBarButtonItem(Theme.CurrentTheme.BackButton, UIBarButtonItemStyle.Plain, (s, e) => NavigationController.PopViewController(true));
108+
}
109+
110+
public override void ViewDidDisappear(bool animated)
111+
{
112+
base.ViewDidDisappear(animated);
113+
NavigationItem.LeftBarButtonItem = null;
108114
}
109115

110116
public override void ViewWillDisappear(bool animated)

0 commit comments

Comments
 (0)