diff --git a/src/sites/twitch-twilight/modules/directory/following.jsx b/src/sites/twitch-twilight/modules/directory/following.jsx
index b58100aa..86832efe 100644
--- a/src/sites/twitch-twilight/modules/directory/following.jsx
+++ b/src/sites/twitch-twilight/modules/directory/following.jsx
@@ -9,6 +9,7 @@ import {createElement} from 'utilities/dom';
import {get} from 'utilities/object';
import Popper from 'popper.js';
+import {makeReference} from 'utilities/tooltip';
import FOLLOWED_INDEX from './followed_index.gql';
import FOLLOWED_HOSTS from './followed_hosts.gql';
@@ -123,8 +124,8 @@ export default class Following extends SiteModule {
if ( ! edges || ! edges.length )
return res;
- const hosts = {},
- out = [];
+ this.hosts = new WeakMap();
+ const out = [];
for(const edge of edges) {
if ( ! edge )
@@ -138,7 +139,7 @@ export default class Following extends SiteModule {
continue;
if ( ! stream.viewersCount ) {
- if ( ! do_grouping || ! hosts[hosted.login] )
+ if ( ! do_grouping || ! this.hosts[hosted.login] )
out.push(edge);
continue;
}
@@ -150,13 +151,13 @@ export default class Following extends SiteModule {
//store.game = stream.game;
if ( do_grouping ) {
- const host_nodes = hosts[hosted.login];
+ const host_nodes = this.hosts[hosted.login];
if ( host_nodes ) {
host_nodes.push(node);
this.hosts.set(store, host_nodes);
} else {
- this.hosts.set(store, hosts[hosted.login] = [node]);
+ this.hosts.set(store, this.hosts[hosted.login] = [node]);
out.push(edge);
}
@@ -224,7 +225,7 @@ export default class Following extends SiteModule {
}
}
- showHostMenu(inst, { channels }, event) {
+ showHostMenu(inst, channels, event) {
if (this.settings.get('directory.following.host-menus') === 0 || this.settings.get('directory.following.host-menus') === 1 && channels.length < 2) return;
event.preventDefault();
@@ -234,7 +235,6 @@ export default class Following extends SiteModule {
this.hostMenu && this.hostMenu.remove();
- const hostData = this.hosts[inst.props.channelName];
const simplebarContentChildren = [];
// Hosted Channel Header
@@ -244,16 +244,16 @@ export default class Following extends SiteModule {
// Hosted Channel Content
simplebarContentChildren.push( this.parent.hijackUserClick(e, hostData.channel, this.destroyHostMenu.bind(this))} // eslint-disable-line react/jsx-no-bind
+ class="tw-block tw-border-radius-small tw-full-width tw-interactable tw-interactable--alpha tw-interactive"
+ href={`/${inst.props.channelLogin}`}
+ onClick={e => this.parent.hijackUserClick(e, inst.props.channelLogin, this.destroyHostMenu.bind(this))} // eslint-disable-line react/jsx-no-bind
>
- {inst.props.channelName}
+ {inst.props.channelDisplayName}
+
- {node.displayName} + {channel.displayName}