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

Commit 8e53b7d

Browse files
committed
Better error reporting
1 parent 5123384 commit 8e53b7d

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

CodeHub.Core/ViewModels/App/AboutViewModel.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,24 @@
22
using System.Windows.Input;
33
using Cirrious.MvvmCross.ViewModels;
44
using CodeHub.Core.ViewModels.Repositories;
5+
using CodeFramework.Core.Services;
56

67
namespace CodeHub.Core.ViewModels.App
78
{
89
public class AboutViewModel : BaseViewModel
910
{
11+
private readonly IEnvironmentService _environmentService;
12+
13+
public AboutViewModel(IEnvironmentService environmentService)
14+
{
15+
_environmentService = environmentService;
16+
}
17+
18+
public string Version
19+
{
20+
get { return _environmentService.ApplicationVersion; }
21+
}
22+
1023
public ICommand GoToSourceCodeCommand
1124
{
1225
get { return new MvxCommand(() => ShowViewModel<RepositoryViewModel>(new RepositoryViewModel.NavObject { Repository = "codehub", Username = "thedillonb" })); }

CodeHub.iOS/AppDelegate.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public override bool FinishedLaunching(UIApplication app, NSDictionary options)
7272
// Setup theme
7373
Theme.Setup();
7474

75-
Mvx.Resolve<CodeFramework.Core.Services.IAnalyticsService>().Init("YDPn28UeAWRt5dTlrd2IhIc3zW4atsiSPScqWmGI", "eDfhufHi88Az1IQkMsIR2o8j5Jmqjmc7FhyQradc");
75+
Mvx.Resolve<CodeFramework.Core.Services.IErrorService>().Init("https://app.getsentry.com/api/21627/store/", "a1cf5eda5acf480a87bbd3c4826767e4", "840cba62d6f84573ab9fdb5f216b87a2");
7676

7777
if (options != null)
7878
{

CodeHub.iOS/Views/App/AboutView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public override void ViewDidLoad()
3939
{
4040
new StyledStringElement("Follow On Twitter".t(), () => UIApplication.SharedApplication.OpenUrl(new NSUrl("https://twitter.com/CodeHubapp"))),
4141
new StyledStringElement("Rate This App".t(), () => UIApplication.SharedApplication.OpenUrl(new NSUrl("https://itunes.apple.com/us/app/codehub-github-for-ios/id707173885?mt=8"))),
42-
new StyledStringElement("App Version".t(), NSBundle.MainBundle.InfoDictionary.ValueForKey(new NSString("CFBundleVersion")).ToString())
42+
new StyledStringElement("App Version".t(), vm.Version)
4343
}
4444
};
4545

0 commit comments

Comments
 (0)