Canapin
(Coin-coin le Canapin)
6 يوليو 2023، 8:29ص
6
حسنًا، لقد أعجب عدد قليل من أعضاء الفريق بمنشورك…
هناك الكثير من الأشياء التي يمكن القيام بها في Discourse، ويتم تحديد الأولويات. عدم وجود إجابة لا يعني عدم الاهتمام، بل يعني أنه ليس أولوية.
لم أكن على علم بمثل هذه الميزة، وبعد تجربتها، أتفق مع اقتراحك.
قد يؤدي إزالة الفلتر أيضًا إلى تعيين التمرير إلى المنشور المعروض حاليًا. حاليًا، يتم التمرير إلى المنشور الأول.
أعتقد أن الكود المتعلق بذلك موجود هنا للمعلومات:
showTopReplies() {
this.cancelFilter();
this.set("filter", "summary");
return this.refreshAndJumpToSecondVisible();
},
// Filter the stream to a particular user.
filterParticipant(username) {
this.cancelFilter();
this.userFilters.addObject(username);
return this.refreshAndJumpToSecondVisible();
},
filterReplies(postNumber, postId) {
this.cancelFilter();
this.set("filterRepliesToPostNumber", postNumber);
this.appEvents.trigger("post-stream:filter-replies", {
topic_id: this.get("topic.id"),
post_number: postNumber,
post_id: postId,
تم الإعلان عن الدالة refreshAndJumpToSecondVisible عدة أسطر أعلاه: discourse/app/assets/javascripts/discourse/app/models/post-stream.js at f69748e32558c2cd1e69b947c201b5a9c8862043 · discourse/discourse · GitHub
ودالة إلغاء الفلتر موجودة هنا:
DiscourseURL.jumpToPost(postNumber, {
originalTopOffset,
});
schedule("afterRender", () => {
highlightPost(postNumber);
});
});
},
filterUpwards(postID) {
this.cancelFilter();
this.set("filterUpwardsPostID", postID);
this.appEvents.trigger("post-stream:filter-upwards", {
topic_id: this.get("topic.id"),
post_id: postID,
});
return this.refresh({ refreshInPlace: true }).then(() => {
this.appEvents.trigger("post-stream:refresh");
if (this.posts && this.posts.length > 1) {
إعجابَين (2)