diff options
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r-- | src/stores/ServicesStore.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 4fb5c9767..f2a8683ba 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -177,13 +177,21 @@ export default class ServicesStore extends Store { | |||
177 | await request._promise; | 177 | await request._promise; |
178 | 178 | ||
179 | newData.iconUrl = request.result.data.iconUrl; | 179 | newData.iconUrl = request.result.data.iconUrl; |
180 | newData.hasCustomUploadedIcon = true; | ||
180 | } | 181 | } |
181 | 182 | ||
182 | this.allServicesRequest.patch((result) => { | 183 | this.allServicesRequest.patch((result) => { |
183 | if (!result) return; | 184 | if (!result) return; |
184 | 185 | ||
186 | // patch custom icon deletion | ||
185 | if (data.customIcon === 'delete') { | 187 | if (data.customIcon === 'delete') { |
186 | data.iconUrl = ''; | 188 | data.iconUrl = ''; |
189 | data.hasCustomUploadedIcon = false; | ||
190 | } | ||
191 | |||
192 | // patch custom icon url | ||
193 | if (data.customIconUrl) { | ||
194 | data.iconUrl = data.customIconUrl; | ||
187 | } | 195 | } |
188 | 196 | ||
189 | Object.assign(result.find(c => c.id === serviceId), newData); | 197 | Object.assign(result.find(c => c.id === serviceId), newData); |
@@ -328,7 +336,7 @@ export default class ServicesStore extends Store { | |||
328 | } | 336 | } |
329 | } else if (channel === 'avatar') { | 337 | } else if (channel === 'avatar') { |
330 | const url = args[0]; | 338 | const url = args[0]; |
331 | if (service.customIconUrl !== url) { | 339 | if (service.iconUrl !== url && !service.hasCustomUploadedIcon) { |
332 | service.customIconUrl = url; | 340 | service.customIconUrl = url; |
333 | 341 | ||
334 | this.actions.service.updateService({ | 342 | this.actions.service.updateService({ |