Fixed: Stop displaying empty messages with resub notices that don't have a message.
+
Changed: Make adjustments to timing and how errors are handled when forcing React components to update to hopefully resolve an impossible to reproduce issue with chat disappearing.
+
+
+
4.0.0-beta1.6@e9ed380d87da80b42502
+
+
Changed: Update setting that hides pinned cheers for the new Top Cheerers leaderboards.
+
+
4.0.0-beta1.6@1d563b0f42b9912f8494
Added: Prime Reminder! Display a crown on subscription buttons when your free channel sub with Prime is available.
diff --git a/src/modules/chat/index.js b/src/modules/chat/index.js
index a6457d85..e7cc664f 100644
--- a/src/modules/chat/index.js
+++ b/src/modules/chat/index.js
@@ -435,6 +435,9 @@ export default class Chat extends Module {
if ( msg.sender && ! msg.user )
msg.user = msg.sender;
+ if ( ! msg.message )
+ return [];
+
let tokens = [{type: 'text', text: msg.message}];
if ( ! tokens[0].text )
return tokens;
diff --git a/src/sites/twitch-twilight/modules/chat/index.js b/src/sites/twitch-twilight/modules/chat/index.js
index fa805829..1818e368 100644
--- a/src/sites/twitch-twilight/modules/chat/index.js
+++ b/src/sites/twitch-twilight/modules/chat/index.js
@@ -177,8 +177,8 @@ export default class ChatHook extends Module {
this.settings.add('chat.bits.show-pinned', {
default: true,
ui: {
- path: 'Chat > Bits and Cheering >> Pinned Cheers',
- title: 'Display Pinned Cheer',
+ path: 'Chat > Bits and Cheering >> Appearance',
+ title: 'Display Top Cheerers',
component: 'setting-check-box'
}
@@ -514,9 +514,7 @@ export default class ChatHook extends Module {
updateChatLines() {
- for(const inst of this.PinnedCheer.instances)
- inst.forceUpdate();
-
+ this.PinnedCheer.forceUpdate();
this.chat_line.updateLines();
}
diff --git a/src/sites/twitch-twilight/modules/chat/line.js b/src/sites/twitch-twilight/modules/chat/line.js
index 7e614c94..6970a6c5 100644
--- a/src/sites/twitch-twilight/modules/chat/line.js
+++ b/src/sites/twitch-twilight/modules/chat/line.js
@@ -100,7 +100,7 @@ export default class ChatLine extends Module {
const tokens = msg.ffz_tokens = msg.ffz_tokens || t.chat.tokenizeMessage(msg, {login: this.props.currentUserLogin, display: this.props.currentUserDisplayName});
let cls = 'chat-line__message',
- out = tokens.length ? [
+ out = (tokens.length || ! msg.ffz_type) ? [
this.props.showTimestamps && e('span', {
className: 'chat-line__timestamp'
}, t.chat.formatTime(msg.timestamp)),
@@ -212,8 +212,9 @@ export default class ChatLine extends Module {
}, out);
}
- for(const inst of instances)
- inst.forceUpdate();
+ // Do this after a short delay to hopefully reduce the chance of React
+ // freaking out on us.
+ setTimeout(() => this.ChatLine.forceUpdate());
})
}
@@ -223,9 +224,9 @@ export default class ChatLine extends Module {
const msg = inst.props.message;
if ( msg )
msg.ffz_tokens = null;
-
- inst.forceUpdate();
}
+
+ this.ChatLine.forceUpdate();
}
}
diff --git a/src/sites/twitch-twilight/modules/css_tweaks/index.js b/src/sites/twitch-twilight/modules/css_tweaks/index.js
index db440606..55dd82fc 100644
--- a/src/sites/twitch-twilight/modules/css_tweaks/index.js
+++ b/src/sites/twitch-twilight/modules/css_tweaks/index.js
@@ -20,7 +20,7 @@ const CLASSES = {
'player-ext': '.player-extensions',
'player-ext-hover': '.player[data-controls="false"] .player-extensions',
- 'pinned-cheer': '.pinned-cheer',
+ 'pinned-cheer': '.pinned-cheer,.pinned-cheer-v2',
'whispers': '.whispers',
'dir-live-ind': '.live-channel-card:not([data-a-target*="host"]) .stream-type-indicator.stream-type-indicator--live',
diff --git a/src/utilities/compat/fine.js b/src/utilities/compat/fine.js
index 8068ce61..ab6700d4 100644
--- a/src/utilities/compat/fine.js
+++ b/src/utilities/compat/fine.js
@@ -504,7 +504,11 @@ export class FineWrapper extends EventEmitter {
forceUpdate() {
for(const inst of this.instances)
- inst.forceUpdate();
+ try {
+ inst.forceUpdate();
+ } catch(err) {
+ this.fine.log.error(`An error occured when calling forceUpdate on an instance of ${this.name}`, err);
+ }
}