Merge branch 'develop' into vue3

This commit is contained in:
syuilo 2020-09-19 13:57:38 +09:00
commit f661cb765a
13 changed files with 46 additions and 21 deletions

View file

@ -65,7 +65,13 @@ export default defineComponent({
}
},
created() {
this.hide = this.image.isSensitive && !this.$store.state.device.alwaysShowNsfw;
// Plugin:register_note_view_interruptor 使watch
this.$watch('image', () => {
this.hide = this.image.isSensitive && !this.$store.state.device.alwaysShowNsfw;
}, {
deep: true,
immediate: true,
});
},
methods: {
onClick() {

View file

@ -59,7 +59,7 @@ export default defineComponent({
computed: {
allIncludeTypes() {
return this.includeTypes ?? this.$store.state.i.includingNotificationTypes;
return this.includeTypes ?? notificationTypes.filter(x => !this.$store.state.i.mutingNotificationTypes.includes(x));
}
},
@ -67,7 +67,7 @@ export default defineComponent({
includeTypes() {
this.reload();
},
'$store.state.i.includingNotificationTypes'() {
'$store.state.i.mutingNotificationTypes'() {
if (this.includeTypes === null) {
this.reload();
}
@ -85,8 +85,7 @@ export default defineComponent({
methods: {
onNotification(notification) {
//
const isMuted = !!this.allIncludeTypes && !this.allIncludeTypes.includes(notification.type);
const isMuted = !this.allIncludeTypes.includes(notification.type);
if (isMuted || document.visibilityState === 'visible') {
os.stream.send('readNotification', {
id: notification.id