コメント対応(MkButtonのimportとonBeforeUpdate->watch)
This commit is contained in:
parent
81df6a6f8d
commit
6d5058c3d7
|
|
@ -90,6 +90,9 @@ function concatMapWithArray(map: MisskeyEntityMap, entities: MisskeyEntity[]): M
|
|||
</script>
|
||||
<script lang="ts" setup>
|
||||
import { infoImageUrl } from '@/instance.js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkLoading from '@/components/global/MkLoading.vue';
|
||||
import MkError from '@/components/global/MkError.vue';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
pagination: Paging;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onBeforeMount, onUnmounted, onBeforeUpdate, provide } from 'vue';
|
||||
import { computed, watch, onUnmounted, provide } from 'vue';
|
||||
import { Connection } from 'misskey-js/built/streaming.js';
|
||||
import MkNotes from '@/components/MkNotes.vue';
|
||||
import MkPullToRefresh from '@/components/MkPullToRefresh.vue';
|
||||
|
|
@ -234,13 +234,16 @@ function refreshEndpointAndChannel() {
|
|||
updatePaginationQuery();
|
||||
}
|
||||
|
||||
// IDが切り替わったら切り替え先のTLを表示させたい
|
||||
watch(() => [props.list, props.antenna, props.channel, props.role], refreshEndpointAndChannel);
|
||||
|
||||
// 初回表示用
|
||||
refreshEndpointAndChannel();
|
||||
|
||||
onUnmounted(() => {
|
||||
disconnectChannel();
|
||||
});
|
||||
|
||||
onBeforeMount(refreshEndpointAndChannel);
|
||||
onBeforeUpdate(refreshEndpointAndChannel);
|
||||
|
||||
function reloadTimeline() {
|
||||
return new Promise<void>((res) => {
|
||||
tlNotesCount = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue