refactor(chat): simplify paid message lock state

This commit is contained in:
2026-07-13 15:20:07 +08:00
parent fd631168c8
commit 4682b4bf3f
17 changed files with 86 additions and 190 deletions
@@ -23,11 +23,7 @@ function makeMessage(
image: { type: null, url: null },
lockDetail: {
locked: false,
showContent: true,
showUpgrade: false,
reason: null,
hint: null,
detail: null,
},
...overrides,
});
@@ -45,11 +41,7 @@ function makeResponse(
image: { type: null, url: null },
lockDetail: {
locked: false,
showContent: true,
showUpgrade: false,
reason: null,
hint: null,
detail: null,
},
...overrides,
});
@@ -28,13 +28,8 @@ export class ChatLocalMessageStore {
audioUrl: normalizeUnlockedAudioUrl(patch.audioUrl, message.audioUrl),
image: patch.image ?? message.image,
lockDetail: patch.lockDetail ?? {
...message.lockDetail,
locked: false,
showContent: true,
showUpgrade: false,
reason: null,
hint: null,
detail: null,
},
});
});