URB v1.0.7 fix not working on canary
This commit is contained in:
parent
2d7640f038
commit
51f04fc50b
|
@ -1,4 +1,7 @@
|
||||||
# [UnreadBadgesRedux](https://1lighty.github.io/BetterDiscordStuff/?plugin=UnreadBadgesRedux "UnreadBadgesRedux") Changelog
|
# [UnreadBadgesRedux](https://1lighty.github.io/BetterDiscordStuff/?plugin=UnreadBadgesRedux "UnreadBadgesRedux") Changelog
|
||||||
|
### 1.0.7
|
||||||
|
- Fixed not working on canary.
|
||||||
|
|
||||||
### 1.0.6
|
### 1.0.6
|
||||||
- Changed to module.exports because useless backwards incompatbile changes are the motto for BBD apparently.
|
- Changed to module.exports because useless backwards incompatbile changes are the motto for BBD apparently.
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ module.exports = (() => {
|
||||||
twitter_username: ''
|
twitter_username: ''
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
version: '1.0.6',
|
version: '1.0.7',
|
||||||
description: 'Adds a number badge to server icons and channels.',
|
description: 'Adds a number badge to server icons and channels.',
|
||||||
github: 'https://github.com/1Lighty',
|
github: 'https://github.com/1Lighty',
|
||||||
github_raw: 'https://raw.githubusercontent.com/1Lighty/BetterDiscordPlugins/master/Plugins/UnreadBadgesRedux/UnreadBadgesRedux.plugin.js'
|
github_raw: 'https://raw.githubusercontent.com/1Lighty/BetterDiscordPlugins/master/Plugins/UnreadBadgesRedux/UnreadBadgesRedux.plugin.js'
|
||||||
|
@ -50,7 +50,7 @@ module.exports = (() => {
|
||||||
{
|
{
|
||||||
title: 'fixed',
|
title: 'fixed',
|
||||||
type: 'fixed',
|
type: 'fixed',
|
||||||
items: ['Changed to module.exports because useless backwards incompatbile changes are the motto for BBD apparently.']
|
items: ['Fixed not working on canary.']
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
defaultConfig: [
|
defaultConfig: [
|
||||||
|
@ -479,7 +479,8 @@ module.exports = (() => {
|
||||||
Patcher.after(BlobMask.component.prototype, 'componentWillUnmount', _this => {
|
Patcher.after(BlobMask.component.prototype, 'componentWillUnmount', _this => {
|
||||||
if (typeof _this.props.__UBR_unread_count !== 'number') return;
|
if (typeof _this.props.__UBR_unread_count !== 'number') return;
|
||||||
if (!_this.state.unreadBadgeMask) return;
|
if (!_this.state.unreadBadgeMask) return;
|
||||||
_this.state.unreadBadgeMask.destroy();
|
if (typeof _this.state.unreadBadgeMask.destroy === 'function') _this.state.unreadBadgeMask.destroy();
|
||||||
|
else _this.state.unreadBadgeMask.dispose();
|
||||||
_this.state.unreadBadgeMask = null;
|
_this.state.unreadBadgeMask = null;
|
||||||
});
|
});
|
||||||
Patcher.after(BlobMask.component.prototype, 'componentDidUpdate', (_this, [{ __UBR_unread_count }]) => {
|
Patcher.after(BlobMask.component.prototype, 'componentDidUpdate', (_this, [{ __UBR_unread_count }]) => {
|
||||||
|
@ -510,7 +511,7 @@ module.exports = (() => {
|
||||||
const counter = _this.props.__UBR_unread_count || _this.state.__UBR_old_unread_count;
|
const counter = _this.props.__UBR_unread_count || _this.state.__UBR_old_unread_count;
|
||||||
if (_this.props.__UBR_unread_count) _this.state.__UBR_old_unread_count = _this.props.__UBR_unread_count;
|
if (_this.props.__UBR_unread_count) _this.state.__UBR_old_unread_count = _this.props.__UBR_unread_count;
|
||||||
const width = BadgesModule.getBadgeWidthForValue(counter);
|
const width = BadgesModule.getBadgeWidthForValue(counter);
|
||||||
const unreadCountMaskSpring = _this.state.unreadBadgeMask.animated.spring;
|
const unreadCountMaskSpring = (_this.state.unreadBadgeMask.animated || _this.state.unreadBadgeMask.springs).spring;
|
||||||
masks.props.children.push(
|
masks.props.children.push(
|
||||||
React.createElement(ReactSpring.animated.rect, {
|
React.createElement(ReactSpring.animated.rect, {
|
||||||
x: -4,
|
x: -4,
|
||||||
|
|
Loading…
Reference in New Issue