Skip to content

Commit

Permalink
Remove useless setting
Browse files Browse the repository at this point in the history
The API only provides results for `NSFW: true` when authenticated, so you don't get any that are branded as nsfw from them.
  • Loading branch information
TheCyberRonin committed Apr 29, 2019
1 parent ce1b452 commit 1f680eb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
14 changes: 0 additions & 14 deletions Settings.jsx

This file was deleted.

4 changes: 1 addition & 3 deletions components/AnimeModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ module.exports = class AnimeModal extends React.Component {
const { entries } = this.state;
const animeResultList = [];
entries.forEach(animeResult => {
if (this.props.getSetting('nsfwFilter', true) && !animeResult.attributes.nsfw) {
animeResultList.push(<AnimeResult className="anime-result" item={animeResult.attributes}/>);
}
animeResultList.push(<AnimeResult className="anime-result" item={animeResult.attributes}/>);
});
return (
<Modal size={Modal.Sizes.LARGE}>
Expand Down
8 changes: 1 addition & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@ const { React, getModuleByDisplayName } = require('powercord/webpack');
const { resolve } = require('path');

const AnimeModal = require('./components/AnimeModal');
const Settings = require('./Settings');

module.exports = class Anime extends Plugin {
async startPlugin () {
this.loadCSS(resolve(__dirname, 'style.scss'));
this._injectModal();
this.registerSettings('anime', 'Anime Search', (props) =>
React.createElement(Settings, {
...props
})
);
}

pluginWillUnload () {
Expand All @@ -33,7 +27,7 @@ module.exports = class Anime extends Plugin {
position: 'bottom'
}, React.createElement('div', {
className: 'anime-header-icon-s',
onClick: () => openModal(() => React.createElement(this.settings.connectStore(AnimeModal)))
onClick: () => openModal(AnimeModal)
}))
);
return res;
Expand Down

0 comments on commit 1f680eb

Please sign in to comment.