Merge remote-tracking branch 'mi-dev/develop' into emoji-req

# Conflicts:
#	CHANGELOG.md
This commit is contained in:
mattyatea 2023-11-15 14:29:33 +09:00
commit d0db959818
No known key found for this signature in database
GPG key ID: 068E54E2C33BEF9A
30 changed files with 620 additions and 164 deletions

View file

@ -43,12 +43,11 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts">
import { computed, ComputedRef, isRef, nextTick, onActivated, onBeforeUnmount, onDeactivated, onMounted, ref, watch } from 'vue';
import { computed, ComputedRef, isRef, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onDeactivated, ref, watch } from 'vue';
import * as Misskey from 'misskey-js';
import * as os from '@/os.js';
import { onScrollTop, isTopVisible, getBodyScrollHeight, getScrollContainer, onScrollBottom, scrollToBottom, scroll, isBottomVisible } from '@/scripts/scroll.js';
import { useDocumentVisibility } from '@/scripts/use-document-visibility.js';
import MkButton from '@/components/MkButton.vue';
import { defaultStore } from '@/store.js';
import { MisskeyEntity } from '@/types/date-separated-list';
import { i18n } from '@/i18n.js';
@ -91,6 +90,7 @@ function concatMapWithArray(map: MisskeyEntityMap, entities: MisskeyEntity[]): M
</script>
<script lang="ts" setup>
import { infoImageUrl } from '@/instance.js';
import MkButton from '@/components/MkButton.vue';
const props = withDefaults(defineProps<{
pagination: Paging;
@ -185,9 +185,8 @@ watch([$$(backed), $$(contentEl)], () => {
}
});
if (props.pagination.params && isRef(props.pagination.params)) {
watch(props.pagination.params, init, { deep: true });
}
// ID
watch(() => props.pagination.params, init, { deep: true });
watch(queue, (a, b) => {
if (a.size === 0 && b.size === 0) return;
@ -438,8 +437,6 @@ const updateItem = (id: MisskeyEntity['id'], replacer: (old: MisskeyEntity) => M
if (queueItem) queue.value.set(id, replacer(queueItem));
};
const inited = init();
onActivated(() => {
isBackTop.value = false;
});
@ -452,8 +449,8 @@ function toBottom() {
scrollToBottom(contentEl!);
}
onMounted(() => {
inited.then(() => {
onBeforeMount(() => {
init().then(() => {
if (props.pagination.reversed) {
nextTick(() => {
setTimeout(toBottom, 800);
@ -485,7 +482,6 @@ defineExpose({
queue,
backed,
more,
inited,
reload,
prepend,
append: appendItem,