Updated removal/deletion detection to match reddit API changes

This commit is contained in:
JubbeArt 2018-08-08 11:22:55 +02:00
parent 4d0632bfd2
commit 48ab597eb4
4 changed files with 6 additions and 17 deletions

View file

@ -46,7 +46,6 @@
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"node-sass": "^4.9.2",
"redux-logger": "^3.0.6",
"standard": "^11.0.1",
"webpack": "^4.16.0",
"webpack-cli": "^3.0.8",

View file

@ -1,6 +1,4 @@
import React from 'react'
import Post from '../common/Post'
import CommentSection from './CommentSection'
import {
getPost,
getComments as getRedditComments
@ -10,9 +8,11 @@ import {
getComments as getPushshiftComments
} from '../../api/pushshift'
import { isDeleted, isRemoved } from '../../utils'
import CommentInfo from './CommentInfo'
import SortBy from './SortBy'
import { connect } from '../../state'
import Post from '../common/Post'
import CommentSection from './CommentSection'
import SortBy from './SortBy'
import CommentInfo from './CommentInfo'
class Thread extends React.Component {
state = {

View file

@ -22,10 +22,10 @@ export const toBase36 = number => parseInt(number, 10).toString(36)
export const toBase10 = numberString => parseInt(numberString, 36)
// Reddits way of indicating that something is deleted
export const isDeleted = textBody => textBody === '[deleted]'
export const isDeleted = textBody => textBody === '\\[deleted\\]'
// Reddits way of indicating that something is deleted
export const isRemoved = textBody => textBody === '[removed]'
export const isRemoved = textBody => textBody === '\\[removed\\]'
// Default thumbnails for reddit threads
export const redditThumbnails = ['self', 'default', 'image', 'nsfw']

View file

@ -1737,10 +1737,6 @@ decode-uri-component@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
deep-diff@^0.3.5:
version "0.3.8"
resolved "https://registry.yarnpkg.com/deep-diff/-/deep-diff-0.3.8.tgz#c01de63efb0eec9798801d40c7e0dae25b582c84"
deep-equal@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5"
@ -4584,12 +4580,6 @@ redent@^1.0.0:
indent-string "^2.1.0"
strip-indent "^1.0.1"
redux-logger@^3.0.6:
version "3.0.6"
resolved "https://registry.yarnpkg.com/redux-logger/-/redux-logger-3.0.6.tgz#f7555966f3098f3c88604c449cf0baf5778274bf"
dependencies:
deep-diff "^0.3.5"
regenerate@^1.2.1:
version "1.4.0"
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11"