削除された投稿はタイムライン上で表示しないようにする (#2887)
* Excepts deleted notes on query * Hide deleted notes * Use v-show
This commit is contained in:
parent
9535759787
commit
1a689f6641
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="note" tabindex="-1" v-hotkey="keymap" :title="title">
|
<div class="note" v-show="p.deletedAt == null" tabindex="-1" v-hotkey="keymap" :title="title">
|
||||||
<div class="reply-to" v-if="p.reply && (!$store.getters.isSignedIn || $store.state.settings.showReplyTarget)">
|
<div class="reply-to" v-if="p.reply && (!$store.getters.isSignedIn || $store.state.settings.showReplyTarget)">
|
||||||
<x-sub :note="p.reply"/>
|
<x-sub :note="p.reply"/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="!mediaView" class="zyjjkidcqjnlegkqebitfviomuqmseqk" :class="{ renote: isRenote }">
|
<div v-if="!mediaView" v-show="p.deletedAt == null" class="zyjjkidcqjnlegkqebitfviomuqmseqk" :class="{ renote: isRenote }">
|
||||||
<div class="reply-to" v-if="p.reply && (!$store.getters.isSignedIn || $store.state.settings.showReplyTarget)">
|
<div class="reply-to" v-if="p.reply && (!$store.getters.isSignedIn || $store.state.settings.showReplyTarget)">
|
||||||
<x-sub :note="p.reply"/>
|
<x-sub :note="p.reply"/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="note" :class="{ renote: isRenote, smart: $store.state.device.postStyle == 'smart' }">
|
<div class="note" v-show="p.deletedAt == null" :class="{ renote: isRenote, smart: $store.state.device.postStyle == 'smart' }">
|
||||||
<div class="reply-to" v-if="p.reply && (!$store.getters.isSignedIn || $store.state.settings.showReplyTarget)">
|
<div class="reply-to" v-if="p.reply && (!$store.getters.isSignedIn || $store.state.settings.showReplyTarget)">
|
||||||
<x-sub :note="p.reply"/>
|
<x-sub :note="p.reply"/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -58,6 +58,8 @@ export default async (params: any, user: ILocalUser) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const query = {
|
const query = {
|
||||||
|
deletedAt: null,
|
||||||
|
|
||||||
// public only
|
// public only
|
||||||
visibility: 'public',
|
visibility: 'public',
|
||||||
|
|
||||||
|
@ -129,6 +129,8 @@ export default async (params: any, user: ILocalUser) => {
|
|||||||
|
|
||||||
const query = {
|
const query = {
|
||||||
$and: [{
|
$and: [{
|
||||||
|
deletedAt: null,
|
||||||
|
|
||||||
$or: [{
|
$or: [{
|
||||||
// フォローしている人の投稿
|
// フォローしている人の投稿
|
||||||
$or: followQuery
|
$or: followQuery
|
||||||
|
@ -71,6 +71,8 @@ export default async (params: any, user: ILocalUser) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const query = {
|
const query = {
|
||||||
|
deletedAt: null,
|
||||||
|
|
||||||
// public only
|
// public only
|
||||||
visibility: 'public',
|
visibility: 'public',
|
||||||
|
|
||||||
|
@ -45,6 +45,8 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
|||||||
|
|
||||||
// Construct query
|
// Construct query
|
||||||
const query = {
|
const query = {
|
||||||
|
deletedAt: null,
|
||||||
|
|
||||||
$or: [{
|
$or: [{
|
||||||
mentions: user._id
|
mentions: user._id
|
||||||
}, {
|
}, {
|
||||||
|
@ -132,6 +132,8 @@ export default async (params: any, user: ILocalUser) => {
|
|||||||
|
|
||||||
const query = {
|
const query = {
|
||||||
$and: [{
|
$and: [{
|
||||||
|
deletedAt: null,
|
||||||
|
|
||||||
// フォローしている人の投稿
|
// フォローしている人の投稿
|
||||||
$or: followQuery,
|
$or: followQuery,
|
||||||
|
|
||||||
|
@ -137,6 +137,8 @@ export default async (params: any, user: ILocalUser) => {
|
|||||||
|
|
||||||
const query = {
|
const query = {
|
||||||
$and: [{
|
$and: [{
|
||||||
|
deletedAt: null,
|
||||||
|
|
||||||
// リストに入っている人のタイムラインへの投稿
|
// リストに入っている人のタイムラインへの投稿
|
||||||
$or: listQuery,
|
$or: listQuery,
|
||||||
|
|
||||||
|
@ -136,6 +136,7 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
|
|||||||
};
|
};
|
||||||
|
|
||||||
const query = {
|
const query = {
|
||||||
|
deletedAt: null,
|
||||||
userId: user._id
|
userId: user._id
|
||||||
} as any;
|
} as any;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user