From 94639a0921da7e5c3f200bca6ba8cdb34938b832 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Fri, 21 Oct 2022 12:03:54 +0200 Subject: [PATCH] Update 0BDFDB.plugin.js --- Library/0BDFDB.plugin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index afb6d2324c..aff923696a 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -2,7 +2,7 @@ * @name BDFDB * @author DevilBro * @authorId 278543574059057154 - * @version 2.8.3 + * @version 2.8.4 * @description Required Library for DevilBro's Plugins * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -4723,13 +4723,13 @@ module.exports = (_ => { handleContextMenu(e) {if (typeof this.props.onContextMenu == "function") this.props.onContextMenu(e, this);} handleMouseEnter(e) {if (typeof this.props.onMouseEnter == "function") this.props.onMouseEnter(e, this);} handleMouseLeave(e) {if (typeof this.props.onMouseLeave == "function") this.props.onMouseLeave(e, this);} + getBadgeWidthForValue(e) {return e < 10 ? 16 : e < 100 ? 22 : 30} render() { return BDFDB.ReactUtils.createElement("div", { className: BDFDB.DOMUtils.formatClassName(this.props.className, BDFDB.disCN.badgenumberbadge, this.props.shape && Internal.LibraryComponents.Badges.BadgeShapes[this.props.shape] || Internal.LibraryComponents.Badges.BadgeShapes.ROUND), style: Object.assign({ backgroundColor: !this.props.disableColor && (this.props.color || Internal.DiscordConstants.Colors.STATUS_RED), - width: Internal.LibraryComponents.Badges.getBadgeWidthForValue(this.props.count), - paddingRight: Internal.LibraryComponents.Badges.getBadgePaddingForValue(this.props.count) + width: this.getBadgeWidthForValue(this.props.count) }, this.props.style), onClick: this.handleClick.bind(this), onContextMenu: this.handleContextMenu.bind(this),