]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Change silences to always require approval on follow
authorThibG <thib@sitedethib.com>
Fri, 27 Sep 2019 19:13:51 +0000 (21:13 +0200)
committerThibaut Girka <thib@sitedethib.com>
Mon, 30 Sep 2019 13:58:29 +0000 (15:58 +0200)
Port front-end changes from 18b451c0e6cf6a927a22084f94b423982de0ee8b to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
app/javascript/flavours/glitch/features/getting_started/index.js

index 68b5209dcdd09a0647ea2ca66168d3f9485a1c87..a5095fbd99cda94999e7185373ee3d53707df5f3 100644 (file)
@@ -104,16 +104,14 @@ const NAVIGATION_PANEL_BREAKPOINT = 600 + (285 * 2) + (10 * 2);
   }
 
   componentDidMount () {
-    const { myAccount, fetchFollowRequests, multiColumn } = this.props;
+    const { fetchFollowRequests, multiColumn } = this.props;
 
     if (!multiColumn && window.innerWidth >= NAVIGATION_PANEL_BREAKPOINT) {
       this.context.router.history.replace('/timelines/home');
       return;
     }
 
-    if (myAccount.get('locked')) {
-      fetchFollowRequests();
-    }
+    fetchFollowRequests();
   }
 
   render () {
@@ -148,7 +146,7 @@ const NAVIGATION_PANEL_BREAKPOINT = 600 + (285 * 2) + (10 * 2);
       navItems.push(<ColumnLink key='5' icon='bookmark' text={intl.formatMessage(messages.bookmarks)} to='/bookmarks' />);
     }
 
-    if (myAccount.get('locked')) {
+    if (myAccount.get('locked') || unreadFollowRequests > 0) {
       navItems.push(<ColumnLink key='6' icon='user-plus' text={intl.formatMessage(messages.follow_requests)} badge={badgeDisplay(unreadFollowRequests, 40)} to='/follow_requests' />);
     }