Merge pull request #3259 from h3poteto/iss-574/fix-mention

refs #574 Fix exclude types in mentions
This commit is contained in:
AkiraFukushima 2022-04-10 11:08:35 +09:00 committed by GitHub
commit 20e01db64d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -5,14 +5,15 @@ import { MyWindow } from '~/src/types/global'
import { LoadingCard } from '@/types/loading-card'
import { LocalMarker } from '~/src/types/localMarker'
const win = (window as any) as MyWindow
const win = window as any as MyWindow
const excludes: Array<string> = [
NotificationType.Follow,
NotificationType.Favourite,
NotificationType.Reblog,
NotificationType.PollVote,
NotificationType.PollExpired
NotificationType.PollExpired,
NotificationType.EmojiReaction
]
export type MentionsState = {
@ -197,7 +198,7 @@ const actions: ActionTree<MentionsState, RootState> = {
if (cardIndex > 0) {
maxID = state.mentions[cardIndex - 1].id
}
let params = { min_id: since_id, limit: 30, exlude_types: excludes }
let params = { min_id: since_id, limit: 30, exclude_types: excludes }
if (maxID !== null) {
params = Object.assign({}, params, {
max_id: maxID