feat: allow collepse replied posts in timeline
This commit is contained in:
parent
f85e6ebb19
commit
d1c76b3882
6 changed files with 18 additions and 0 deletions
|
@ -2241,3 +2241,4 @@ incorrectLanguageWarning: "It looks like your post is in {detected}, but you sel
|
|||
noteEditHistory: "Post edit history"
|
||||
slashQuote: "Chain quote"
|
||||
foldNotification: "Group similar notifications"
|
||||
collapseReplyInTimeline: "Collapse replied posts in timeline"
|
||||
|
|
|
@ -2068,3 +2068,4 @@ noteEditHistory: "帖子编辑历史"
|
|||
media: 媒体
|
||||
slashQuote: "斜杠引用"
|
||||
foldNotification: "将通知按同类型分组"
|
||||
collapseReplyInTimeline: "折叠显示时间线里被回复的帖子"
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
:key="note._featuredId_ || note._prId_ || note.id"
|
||||
class="qtqtichx"
|
||||
:note="note"
|
||||
:collapsed-reply="collapsedReply"
|
||||
/>
|
||||
</XList>
|
||||
</div>
|
||||
|
@ -58,6 +59,7 @@ defineProps<{
|
|||
pagination: PagingOf<entities.Note>;
|
||||
noGap?: boolean;
|
||||
disableAutoLoad?: boolean;
|
||||
collapsedReply?: boolean;
|
||||
}>();
|
||||
|
||||
const pagingComponent = ref<MkPaginationType<
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
:pagination="pagination"
|
||||
@queue="(x) => (queue = x)"
|
||||
@status="pullToRefreshComponent?.setDisabled($event)"
|
||||
:collapsed-reply
|
||||
/>
|
||||
</MkPullToRefresh>
|
||||
<XNotes
|
||||
|
@ -39,6 +40,7 @@
|
|||
:pagination="pagination"
|
||||
@queue="(x) => (queue = x)"
|
||||
@status="pullToRefreshComponent?.setDisabled($event)"
|
||||
:collapsed-reply
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
@ -85,6 +87,8 @@ const emit = defineEmits<{
|
|||
const tlComponent = ref<InstanceType<typeof XNotes>>();
|
||||
const pullToRefreshComponent = ref<InstanceType<typeof MkPullToRefresh>>();
|
||||
|
||||
const collapsedReply = defaultStore.reactiveState.collapseReplyInTimeline;
|
||||
|
||||
let endpoint: TypeUtils.EndpointsOf<entities.Note[]>; // keyof Endpoints
|
||||
let query: {
|
||||
antennaId?: string | undefined;
|
||||
|
|
|
@ -134,6 +134,9 @@
|
|||
<FormSwitch v-model="foldNotification" class="_formBlock">{{
|
||||
i18n.ts.foldNotification
|
||||
}}</FormSwitch>
|
||||
<FormSwitch v-model="collapseReplyInTimeline" class="_formBlock">{{
|
||||
i18n.ts.collapseReplyInTimeline
|
||||
}}</FormSwitch>
|
||||
|
||||
<FormSelect v-model="serverDisconnectedBehavior" class="_formBlock">
|
||||
<template #label>{{ i18n.ts.whenServerDisconnected }}</template>
|
||||
|
@ -549,6 +552,9 @@ const autocorrectNoteLanguage = computed(
|
|||
const foldNotification = computed(
|
||||
defaultStore.makeGetterSetter("foldNotification"),
|
||||
);
|
||||
const collapseReplyInTimeline = computed(
|
||||
defaultStore.makeGetterSetter("collapseReplyInTimeline"),
|
||||
);
|
||||
|
||||
// This feature (along with injectPromo) is currently disabled
|
||||
// function onChangeInjectFeaturedNote(v) {
|
||||
|
|
|
@ -454,6 +454,10 @@ export const defaultStore = markRaw(
|
|||
where: "deviceAccount",
|
||||
default: true,
|
||||
},
|
||||
collapseReplyInTimeline: {
|
||||
where: "deviceAccount",
|
||||
default: true,
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue