fix: todo and photo packs

This commit is contained in:
David Ralph
2023-03-11 17:06:54 +00:00
committed by GitHub
parent 9bb65a9704
commit 76f5bff3dd
4 changed files with 59 additions and 52 deletions

View File

@@ -5,6 +5,10 @@ function showReminder() {
localStorage.setItem('showReminder', true);
}
function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
// based on https://stackoverflow.com/questions/37684/how-to-replace-plain-urls-with-links
export function urlParser(input) {
const urlPattern =
@@ -45,6 +49,9 @@ export function install(type, input, sideload) {
localStorage.setItem('backgroundType', 'photo_pack');
localStorage.removeItem('backgroundchange');
EventBus.dispatch('refresh', 'background');
// TODO: make this legitimately good and work without a reload - currently we just refresh
sleep(4000);
window.location.reload();
break;
case 'quotes':