This repository was archived by the owner on Jul 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 617
/
Copy pathSettings.cs
60 lines (51 loc) · 2.13 KB
/
Settings.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
using Plugin.Settings;
using Plugin.Settings.Abstractions;
namespace CodeHub.Core
{
public static class Settings
{
private const string DefaultAccountKey = "DEFAULT_ACCOUNT";
private const string ShouldStarKey = "SHOULD_STAR_CODEHUB";
private const string ShouldWatchKey = "SHOULD_WATCH_CODEHUB";
private const string HasSeenWelcomeKey = "HAS_SEEN_WELCOME_INTRO";
private const string ProEditionKey = "com.dillonbuchanan.codehub.pro";
private const string HasSeenOAuthKey = "HAS_SEEN_OAUTH_INFO";
private const string ImgurUploadWarn = "IMGUR_UPLOAD_WARN";
private static ISettings AppSettings => CrossSettings.Current;
public static string DefaultAccount
{
get => AppSettings.GetValueOrDefault(DefaultAccountKey, null);
set => AppSettings.AddOrUpdateValue(DefaultAccountKey, value);
}
public static bool ShouldStar
{
get => AppSettings.GetValueOrDefault(ShouldStarKey, false);
set => AppSettings.AddOrUpdateValue(ShouldStarKey, value);
}
public static bool ShouldWatch
{
get => AppSettings.GetValueOrDefault(ShouldWatchKey, false);
set => AppSettings.AddOrUpdateValue(ShouldWatchKey, value);
}
public static bool HasSeenWelcome
{
get => AppSettings.GetValueOrDefault(HasSeenWelcomeKey, false);
set => AppSettings.AddOrUpdateValue(HasSeenWelcomeKey, value);
}
public static bool IsProEnabled
{
get => AppSettings.GetValueOrDefault(ProEditionKey, false);
set => AppSettings.AddOrUpdateValue(ProEditionKey, value);
}
public static bool HasSeenOAuthWelcome
{
get => AppSettings.GetValueOrDefault(HasSeenOAuthKey, false);
set => AppSettings.AddOrUpdateValue(HasSeenOAuthKey, value);
}
public static bool HasSeenImgurUploadWarn
{
get => AppSettings.GetValueOrDefault(ImgurUploadWarn, false);
set => AppSettings.AddOrUpdateValue(ImgurUploadWarn, value);
}
}
}