Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Oct 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions packages/frontend/src/ui/deck/list-column.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
</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>
</template>

<script lang="ts" setup>
import { } from 'vue';
import { watch } from 'vue';
import XColumn from './column.vue';
import { updateColumn, Column } from './deck-store';
import MkTimeline from '@/components/MkTimeline.vue';
Expand All @@ -27,11 +27,18 @@ const props = defineProps<{
}>();

let timeline = $shallowRef<InstanceType<typeof MkTimeline>>();
const withRenotes = $ref(props.column.withRenotes ?? true);

if (props.column.listId == null) {
setList();
}

watch($$(withRenotes), v => {
updateColumn(props.column.id, {
withRenotes: v,
});
});

async function setList() {
const lists = await os.api('users/lists/list');
const { canceled, result: list } = await os.select({
Expand Down Expand Up @@ -62,5 +69,10 @@ const menu = [
text: i18n.ts.editList,
action: editList,
},
{
type: 'switch',
text: i18n.ts.showRenotes,
ref: $$(withRenotes),
},
];
</script>