コメント対応(MkButtonのimportとonBeforeUpdate->watch)

This commit is contained in:
osamu 2023-11-05 11:12:42 +09:00
parent 81df6a6f8d
commit 6d5058c3d7
2 changed files with 10 additions and 4 deletions

View File

@ -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;

View File

@ -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();
}
// IDTL
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;