Skip to content

Commit

Permalink
Fixed rendering issue
Browse files Browse the repository at this point in the history
Fixed an issue with the plugin not loading the `kitsu` icon to open the modal.
Added Kitsu svg
Updated minor version number.
  • Loading branch information
TheCyberRonin committed Nov 8, 2019
1 parent 1f680eb commit c6809c1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
22 changes: 12 additions & 10 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,18 @@ module.exports = class Anime extends Plugin {

async _injectModal () {
const HeaderBarContainer = await getModuleByDisplayName('HeaderBarContainer');
inject('anime-headerbar', HeaderBarContainer.prototype, 'renderToolbar', (args, res) => {
res.props.children.push(
React.createElement(Tooltip, {
text: 'Anime lookup',
position: 'bottom'
}, React.createElement('div', {
className: 'anime-header-icon-s',
onClick: () => openModal(AnimeModal)
}))
);
inject('anime-headerbar', HeaderBarContainer.prototype, 'renderLoggedIn', (args, res) => {
if (res.props.toolbar && res.props.toolbar.props.children && res.props.toolbar.props.children[0][0]) {
res.props.children.push(
React.createElement(Tooltip, {
text: 'Anime lookup',
position: 'bottom'
}, React.createElement('div', {
className: 'anime-header-icon-s',
onClick: () => openModal(AnimeModal)
}))
);
}
return res;
});
}
Expand Down
1 change: 1 addition & 0 deletions kitsu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Anime",
"version": "1.0.0",
"version": "1.0.1",
"description": "Anime lookup inside of Powercord",
"author": "CyberRonin",
"license": "MIT"
Expand Down

0 comments on commit c6809c1

Please sign in to comment.