mirror of
https://github.com/mue/mue.git
synced 2026-06-13 03:58:49 +02:00
fix: hot reload on background
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { toast } from 'react-toastify';
|
||||
|
||||
import EventBus from './eventbus';
|
||||
|
||||
export default class MarketplaceFunctions {
|
||||
// based on https://stackoverflow.com/questions/37684/how-to-replace-plain-urls-with-links
|
||||
static urlParser (input) {
|
||||
@@ -23,6 +25,7 @@ export default class MarketplaceFunctions {
|
||||
localStorage.removeItem('photo_packs');
|
||||
localStorage.setItem('backgroundType', localStorage.getItem('oldBackgroundType'));
|
||||
localStorage.removeItem('oldBackgroundType');
|
||||
EventBus.dispatch('refresh', 'background');
|
||||
break;
|
||||
default:
|
||||
try {
|
||||
@@ -65,6 +68,7 @@ export default class MarketplaceFunctions {
|
||||
localStorage.setItem('photo_packs', JSON.stringify(input.photos));
|
||||
localStorage.setItem('oldBackgroundType', localStorage.getItem('backgroundType'));
|
||||
localStorage.setItem('backgroundType', 'photo_pack');
|
||||
EventBus.dispatch('refresh', 'background');
|
||||
break;
|
||||
|
||||
case 'quote_packs':
|
||||
|
||||
Reference in New Issue
Block a user