debug(feed): trace 哪里调的 clearPrompts
This commit is contained in:
@@ -53,6 +53,8 @@ const articlesWithPrompts = computed(() => {
|
||||
|
||||
// 移除某篇文章的所有提示条(8 秒超时 / 确认后 / 过滤变化)
|
||||
function clearPromptsForArticle(articleId: number) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('[CLEAR_ONE]', articleId, 'stack:', new Error().stack?.split('\n').slice(2, 5).join(' | '))
|
||||
if (categoryPromptsByArticle.value.has(articleId)) {
|
||||
const next = new Map(categoryPromptsByArticle.value)
|
||||
next.delete(articleId)
|
||||
@@ -62,6 +64,8 @@ function clearPromptsForArticle(articleId: number) {
|
||||
|
||||
// 全清
|
||||
function clearAllPrompts() {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('[CLEAR_ALL] size=', categoryPromptsByArticle.value.size, 'stack:', new Error().stack?.split('\n').slice(2, 5).join(' | '))
|
||||
if (categoryPromptsByArticle.value.size > 0) {
|
||||
categoryPromptsByArticle.value = new Map()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user