このコミットが含まれているのは:
@@ -32,8 +32,7 @@ export const candidatePostsFor = (
|
||||
answers: GekanatorAnswerLog[]
|
||||
softenedQuestionIds: Set<string>
|
||||
rejectedPostIds: Set<number>
|
||||
recoveredCandidatePosts: Map<number, RecoveredCandidateState> },
|
||||
): Post[] => {
|
||||
recoveredCandidatePosts: Map<number, RecoveredCandidateState> }): Post[] => {
|
||||
const questionById = new Map (questions.map (question => [question.id, question]))
|
||||
|
||||
return posts.filter (post => {
|
||||
@@ -76,8 +75,7 @@ export const candidatePostsFor = (
|
||||
export const hardFilteredPostsForAnswer = (
|
||||
{ posts, question, answer }: { posts: Post[]
|
||||
question: GekanatorQuestion
|
||||
answer: GekanatorAnswerValue },
|
||||
): Post[] => {
|
||||
answer: GekanatorAnswerValue }): Post[] => {
|
||||
if (!(questionSupportsAnswerBasedHardFiltering (question)))
|
||||
return posts
|
||||
|
||||
@@ -98,8 +96,7 @@ const concreteAnswerOptions: GekanatorAnswerValue[] = ['yes', 'no', 'partial', '
|
||||
|
||||
export const allConcreteAnswerOptionsExhausted = (
|
||||
posts: Post[],
|
||||
question: GekanatorQuestion | null,
|
||||
): boolean => {
|
||||
question: GekanatorQuestion | null): boolean => {
|
||||
if (!(question))
|
||||
return false
|
||||
|
||||
@@ -125,8 +122,7 @@ export const recoverCandidatePosts = (
|
||||
recoveredCandidatePosts: Map<number, RecoveredCandidateState>
|
||||
eligiblePostIds: Set<number>
|
||||
answerCountAtRecovery: number
|
||||
recoveryStepCount: number },
|
||||
): { recoveredCandidatePosts: Map<number, RecoveredCandidateState>
|
||||
recoveryStepCount: number }): { recoveredCandidatePosts: Map<number, RecoveredCandidateState>
|
||||
recoveryStepCount: number } | null => {
|
||||
const recovered = new Map (recoveredCandidatePosts)
|
||||
const targetSize = nextRecoveryTargetSize (recoveryStepCount)
|
||||
|
||||
新しい課題から参照
ユーザをブロックする