fix: deck uiでuser listを見たときにリプライが表示されない (#11951)

* fix: deck uiでuser listを見たときにリプライが表示されない

* docs(changelog): deck uiでuser listを見たときにリプライが表示されない

* Update list-column.vue

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
anatawa12 2023-10-03 20:38:34 +09:00 committed by GitHub
parent f3e09af35b
commit 5fd0cb31f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,12 +9,12 @@ SPDX-License-Identifier: AGPL-3.0-only
<i class="ti ti-list"></i><span style="margin-left: 8px;">{{ column.name }}</span> <i class="ti ti-list"></i><span style="margin-left: 8px;">{{ column.name }}</span>
</template> </template>
<MkTimeline v-if="column.listId" ref="timeline" src="list" :list="column.listId"/> <MkTimeline v-if="column.listId" ref="timeline" src="list" :list="column.listId" :withRenotes="withRenotes"/>
</XColumn> </XColumn>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { } from 'vue'; import { watch } from 'vue';
import XColumn from './column.vue'; import XColumn from './column.vue';
import { updateColumn, Column } from './deck-store'; import { updateColumn, Column } from './deck-store';
import MkTimeline from '@/components/MkTimeline.vue'; import MkTimeline from '@/components/MkTimeline.vue';
@ -27,11 +27,18 @@ const props = defineProps<{
}>(); }>();
let timeline = $shallowRef<InstanceType<typeof MkTimeline>>(); let timeline = $shallowRef<InstanceType<typeof MkTimeline>>();
const withRenotes = $ref(props.column.withRenotes ?? true);
if (props.column.listId == null) { if (props.column.listId == null) {
setList(); setList();
} }
watch($$(withRenotes), v => {
updateColumn(props.column.id, {
withRenotes: v,
});
});
async function setList() { async function setList() {
const lists = await os.api('users/lists/list'); const lists = await os.api('users/lists/list');
const { canceled, result: list } = await os.select({ const { canceled, result: list } = await os.select({
@ -62,5 +69,10 @@ const menu = [
text: i18n.ts.editList, text: i18n.ts.editList,
action: editList, action: editList,
}, },
{
type: 'switch',
text: i18n.ts.showRenotes,
ref: $$(withRenotes),
},
]; ];
</script> </script>