From 9c3776d03416097041ea3db0c735486b5a8dbf91 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 7 Aug 2020 13:22:03 -0400 Subject: [PATCH] Removing community and user favicon setting. --- ui/src/components/community.tsx | 6 +----- ui/src/components/post.tsx | 6 +++++- ui/src/components/user.tsx | 4 +--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ui/src/components/community.tsx b/ui/src/components/community.tsx index 437d2cbd..e71306d6 100644 --- a/ui/src/components/community.tsx +++ b/ui/src/components/community.tsx @@ -190,11 +190,7 @@ export class Community extends Component { } get favIcon(): string { - return this.state.community.icon - ? this.state.community.icon - : this.state.site.icon - ? this.state.site.icon - : favIconUrl; + return this.state.site.icon ? this.state.site.icon : favIconUrl; } render() { diff --git a/ui/src/components/post.tsx b/ui/src/components/post.tsx index abb603d5..3778ec90 100644 --- a/ui/src/components/post.tsx +++ b/ui/src/components/post.tsx @@ -92,6 +92,8 @@ export class Post extends Component { enable_downvotes: undefined, open_registration: undefined, enable_nsfw: undefined, + icon: undefined, + banner: undefined, }, online: null, version: null, @@ -191,7 +193,9 @@ export class Post extends Component { } get favIcon(): string { - return this.state.post ? this.state.post.community_icon : favIconUrl; + return this.state.siteRes.site.icon + ? this.state.siteRes.site.icon + : favIconUrl; } render() { diff --git a/ui/src/components/user.tsx b/ui/src/components/user.tsx index 0d0b0143..ad77e267 100644 --- a/ui/src/components/user.tsx +++ b/ui/src/components/user.tsx @@ -238,9 +238,7 @@ export class User extends Component { } get favIcon(): string { - return this.state.user.avatar - ? this.state.user.avatar - : this.state.siteRes.site.icon + return this.state.siteRes.site.icon ? this.state.siteRes.site.icon : favIconUrl; } -- 2.44.1