Merge branch 'sw-notification-action' of https://github.com/tamaina/misskey into sw-notification-action
This commit is contained in:
@@ -192,8 +192,6 @@ export default (opts) => ({
|
||||
this.items = this.items.slice(-opts.displayLimit);
|
||||
this.more = true;
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
this.items.push(item);
|
||||
// TODO
|
||||
|
@@ -1,10 +1,18 @@
|
||||
// SafariがBroadcastChannel未実装なのでライブラリを使う
|
||||
import { BroadcastChannel } from 'broadcast-channel';
|
||||
|
||||
export const reloadChannel = new BroadcastChannel<'reload'>('reload');
|
||||
export const reloadChannel = new BroadcastChannel<boolean>('reload');
|
||||
|
||||
// BroadcastChannelを用いて、クライアントが一斉にreloadするようにします。
|
||||
export function unisonReload() {
|
||||
reloadChannel.postMessage('reload');
|
||||
location.reload();
|
||||
export function unisonReload(redirectToRoot: boolean = false) {
|
||||
reloadChannel.postMessage(!!redirectToRoot);
|
||||
reload();
|
||||
}
|
||||
|
||||
export function reload(redirectToRoot: boolean = false) {
|
||||
if (redirectToRoot) {
|
||||
location.href = '/';
|
||||
} else {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user