From 44e33fbf27a6664ea0396dc840e80c94ca1ebebb Mon Sep 17 00:00:00 2001 From: SirStendec Date: Mon, 18 Mar 2019 23:46:20 -0400 Subject: [PATCH] 4.0.0-rc15.1 * Fixed: Issue with channel metadata not loading correctly on channel pages. * Changed: Attempt to display stream up-time data on the Discover page. This currently only works if you don't load that page directly. --- src/main.js | 2 +- .../modules/channel_header_query.gql | 3 +++ .../twitch-twilight/modules/channel_page_query.gql | 4 ++++ .../modules/directory/following.jsx | 14 ++++++++++++++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 74ad7c2e..b7d61f5b 100644 --- a/src/main.js +++ b/src/main.js @@ -149,7 +149,7 @@ ${typeof x[1] === 'string' ? x[1] : JSON.stringify(x[1], null, 4)}` FrankerFaceZ.Logger = Logger; const VER = FrankerFaceZ.version_info = { - major: 4, minor: 0, revision: 0, extra: '-rc15', + major: 4, minor: 0, revision: 0, extra: '-rc15.1', commit: __git_commit__, build: __webpack_hash__, toString: () => diff --git a/src/sites/twitch-twilight/modules/channel_header_query.gql b/src/sites/twitch-twilight/modules/channel_header_query.gql index f9b3b47b..eab01003 100644 --- a/src/sites/twitch-twilight/modules/channel_header_query.gql +++ b/src/sites/twitch-twilight/modules/channel_header_query.gql @@ -1,8 +1,11 @@ query ChannelPage_ChannelHeader { user { + id stream { + id createdAt type + __typename } } } \ No newline at end of file diff --git a/src/sites/twitch-twilight/modules/channel_page_query.gql b/src/sites/twitch-twilight/modules/channel_page_query.gql index 444de3b0..276ff87f 100644 --- a/src/sites/twitch-twilight/modules/channel_page_query.gql +++ b/src/sites/twitch-twilight/modules/channel_page_query.gql @@ -1,14 +1,18 @@ fragment channel on User { stream { + id createdAt + __typename } } fragment hostingChannel on User { hosting { stream { + id createdAt type + __typename } } } \ No newline at end of file diff --git a/src/sites/twitch-twilight/modules/directory/following.jsx b/src/sites/twitch-twilight/modules/directory/following.jsx index 9216b8a6..caaa5ec6 100644 --- a/src/sites/twitch-twilight/modules/directory/following.jsx +++ b/src/sites/twitch-twilight/modules/directory/following.jsx @@ -84,6 +84,20 @@ export default class Following extends SiteModule { this.modifyLiveHosts(res); }, false); + this.apollo.registerModifier('Shelves', res => { + const shelves = get('data.shelves.edges', res); + if ( ! Array.isArray(shelves) ) + return; + + for(const shelf of shelves) { + const edges = get('node.content.edges', shelf); + if ( ! Array.isArray(edges) ) + continue; + + shelf.node.content.edges = this.parent.processNodes(edges); + } + }, false); + this.hosts = new WeakMap; }