ensure filters group

This commit is contained in:
Martti Malmi 2021-08-03 19:29:38 +03:00
parent 921c709bfc
commit 66f270cb39
2 changed files with 5 additions and 12 deletions

View File

@ -44,18 +44,6 @@ if (window.location.hash && window.location.hash.indexOf('#/') === 0) { // redir
const userAgent = navigator.userAgent.toLowerCase();
const isElectron = (userAgent.indexOf(' electron/') > -1);
/*
if (!isElectron && ('serviceWorker' in navigator)) {
window.addEventListener('load', function() {
navigator.serviceWorker.register(new URL('../sw.js', import.meta.url))
.catch(function(err) {
// registration failed :(
console.log('ServiceWorker registration failed: ', err);
});
});
}
*/
State.init();
Session.init({autologin: window.location.pathname.length > 2});
PeerManager.init();

View File

@ -193,6 +193,11 @@ function login(k) {
State.local.get('settings').on(local => {
settings.local = local;
});
State.local.get('filters').get('group').once().then(v => {
if (!v) {
State.local.get('filters').get('group').put('follows');
}
});
}
async function createChatLink() {