diff options
author | Stefan Malzner <stefan@adlk.io> | 2018-01-17 10:34:22 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-17 10:34:22 +0400 |
commit | 81b49fba430959ec4e0946f905dc182d2733831c (patch) | |
tree | a1979dafda41ac804986ef57a68912a868cb5ac7 /src/models | |
parent | Remove idle timer dependency (diff) | |
parent | Merge branch 'develop' of github.com:meetfranz/franz into develop (diff) | |
download | ferdium-app-81b49fba430959ec4e0946f905dc182d2733831c.tar.gz ferdium-app-81b49fba430959ec4e0946f905dc182d2733831c.tar.zst ferdium-app-81b49fba430959ec4e0946f905dc182d2733831c.zip |
Merge branch 'develop' into feature/remove-miner
Diffstat (limited to 'src/models')
-rw-r--r-- | src/models/Service.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/models/Service.js b/src/models/Service.js index 0b19440e7..423510c7d 100644 --- a/src/models/Service.js +++ b/src/models/Service.js | |||
@@ -24,7 +24,8 @@ export default class Service { | |||
24 | @observable isNotificationEnabled = true; | 24 | @observable isNotificationEnabled = true; |
25 | @observable isBadgeEnabled = true; | 25 | @observable isBadgeEnabled = true; |
26 | @observable isIndirectMessageBadgeEnabled = true; | 26 | @observable isIndirectMessageBadgeEnabled = true; |
27 | @observable customIconUrl = ''; | 27 | @observable iconUrl = ''; |
28 | @observable hasCustomUploadedIcon = false; | ||
28 | @observable hasCrashed = false; | 29 | @observable hasCrashed = false; |
29 | 30 | ||
30 | constructor(data, recipe) { | 31 | constructor(data, recipe) { |
@@ -42,7 +43,8 @@ export default class Service { | |||
42 | this.name = data.name || this.name; | 43 | this.name = data.name || this.name; |
43 | this.team = data.team || this.team; | 44 | this.team = data.team || this.team; |
44 | this.customUrl = data.customUrl || this.customUrl; | 45 | this.customUrl = data.customUrl || this.customUrl; |
45 | this.customIconUrl = data.customIconUrl || this.customIconUrl; | 46 | // this.customIconUrl = data.customIconUrl || this.customIconUrl; |
47 | this.iconUrl = data.iconUrl || this.iconUrl; | ||
46 | 48 | ||
47 | this.order = data.order !== undefined | 49 | this.order = data.order !== undefined |
48 | ? data.order : this.order; | 50 | ? data.order : this.order; |
@@ -61,6 +63,8 @@ export default class Service { | |||
61 | 63 | ||
62 | this.isMuted = data.isMuted !== undefined ? data.isMuted : this.isMuted; | 64 | this.isMuted = data.isMuted !== undefined ? data.isMuted : this.isMuted; |
63 | 65 | ||
66 | this.hasCustomUploadedIcon = data.hasCustomIcon !== undefined ? data.hasCustomIcon : this.hasCustomUploadedIcon; | ||
67 | |||
64 | this.recipe = recipe; | 68 | this.recipe = recipe; |
65 | 69 | ||
66 | autorun(() => { | 70 | autorun(() => { |
@@ -97,15 +101,15 @@ export default class Service { | |||
97 | } | 101 | } |
98 | 102 | ||
99 | @computed get icon() { | 103 | @computed get icon() { |
100 | if (this.hasCustomIcon) { | 104 | if (this.iconUrl) { |
101 | return this.customIconUrl; | 105 | return this.iconUrl; |
102 | } | 106 | } |
103 | 107 | ||
104 | return path.join(this.recipe.path, 'icon.svg'); | 108 | return path.join(this.recipe.path, 'icon.svg'); |
105 | } | 109 | } |
106 | 110 | ||
107 | @computed get hasCustomIcon() { | 111 | @computed get hasCustomIcon() { |
108 | return (this.customIconUrl !== ''); | 112 | return Boolean(this.iconUrl); |
109 | } | 113 | } |
110 | 114 | ||
111 | @computed get iconPNG() { | 115 | @computed get iconPNG() { |