aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/User.ts
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-08-21 07:13:33 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-08-21 07:13:33 +0530
commit563e4d8cbf0c20d541aeeb9d0b1d530f8107273b (patch)
tree222f5c31c9056ee352394223f45f2a2cf6d7da28 /src/models/User.ts
parentfixing linter issue [skip ci] (diff)
downloadferdium-app-563e4d8cbf0c20d541aeeb9d0b1d530f8107273b.tar.gz
ferdium-app-563e4d8cbf0c20d541aeeb9d0b1d530f8107273b.tar.zst
ferdium-app-563e4d8cbf0c20d541aeeb9d0b1d530f8107273b.zip
refactor(cleanup): remove code that refers to paid subscription
(since we are always premium/free)
Diffstat (limited to 'src/models/User.ts')
-rw-r--r--src/models/User.ts22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/models/User.ts b/src/models/User.ts
index 8c6c2b1c9..771d11955 100644
--- a/src/models/User.ts
+++ b/src/models/User.ts
@@ -8,13 +8,8 @@ interface IUser {
8 organization: string | null; 8 organization: string | null;
9 accountType: string | null; 9 accountType: string | null;
10 beta: boolean; 10 beta: boolean;
11 donor: object;
12 isDonor: boolean;
13 isMiner: boolean;
14 locale: boolean; 11 locale: boolean;
15 isSubscriptionOwner: boolean; 12 isSubscriptionOwner: boolean;
16 hasSubscription: boolean;
17 hadSubscription: boolean;
18 team: object; 13 team: object;
19} 14}
20 15
@@ -34,24 +29,14 @@ export default class User {
34 29
35 @observable emailIsConfirmed = true; 30 @observable emailIsConfirmed = true;
36 31
37 // TODO: Need to delete references to 'subscription' and 'donor' 32 // Note: Kept around to be able to handle the response from Franz server
38 // better assume it's confirmed to avoid noise 33 // better assume it's confirmed to avoid noise
39 @observable subscription = {}; 34 @observable subscription = {};
40 35
41 @observable isSubscriptionOwner = false; 36 @observable isSubscriptionOwner = false;
42 37
43 @observable hasSubscription = true;
44
45 @observable hadSubscription = false;
46
47 @observable beta = false; 38 @observable beta = false;
48 39
49 @observable donor = {};
50
51 @observable isDonor = false;
52
53 @observable isMiner = false;
54
55 @observable locale = false; 40 @observable locale = false;
56 41
57 @observable team = {}; 42 @observable team = {};
@@ -68,14 +53,9 @@ export default class User {
68 this.organization = data.organization || this.organization; 53 this.organization = data.organization || this.organization;
69 this.accountType = data.accountType || this.accountType; 54 this.accountType = data.accountType || this.accountType;
70 this.beta = data.beta || this.beta; 55 this.beta = data.beta || this.beta;
71 this.donor = data.donor || this.donor;
72 this.isDonor = data.isDonor || this.isDonor;
73 this.isMiner = data.isMiner || this.isMiner;
74 this.locale = data.locale || this.locale; 56 this.locale = data.locale || this.locale;
75 57
76 this.isSubscriptionOwner = data.isSubscriptionOwner || this.isSubscriptionOwner; 58 this.isSubscriptionOwner = data.isSubscriptionOwner || this.isSubscriptionOwner;
77 this.hasSubscription = data.hasSubscription || this.hasSubscription;
78 this.hadSubscription = data.hadSubscription || this.hadSubscription;
79 59
80 this.team = data.team || this.team; 60 this.team = data.team || this.team;
81 } 61 }