Notification badge on mobile, put badge setting for everywhere

This commit is contained in:
Marquis Kurt 2019-04-21 13:56:18 -04:00
parent b97a61986d
commit 6579efde11
2 changed files with 18 additions and 17 deletions

View File

@ -199,7 +199,11 @@ export class AppLayout extends Component<any, IAppLayoutState> {
<ListItemText primary={this.state.currentUser? (this.state.currentUser.display_name || this.state.currentUser.acct): "Loading..."} secondary={this.state.currentUser? this.state.currentUser.acct: "Loading..."}/>
</LinkableListItem>
<LinkableListItem button key="notifications-mobile" to="/notifications">
<ListItemIcon><NotificationsIcon/></ListItemIcon>
<ListItemIcon>
<Badge badgeContent={this.state.notificationCount > 0? this.state.notificationCount: ""} color="secondary">
<NotificationsIcon />
</Badge>
</ListItemIcon>
<ListItemText primary="Notifications"/>
</LinkableListItem>
<LinkableListItem button key="messages-mobile" to="/messages">

View File

@ -358,23 +358,20 @@ class SettingsPage extends Component<any, ISettingsState> {
/>
</ListItemSecondaryAction>
</ListItem>
{
browserSupportsNotificationRequests()?
<ListItem>
<ListItemText
primary="Notification badge counts all notifications"
secondary={
"Counts all notifications, read or unread."
}
<ListItem>
<ListItemText
primary="Notification badge counts all notifications"
secondary={
"Counts all notifications, read or unread."
}
/>
<ListItemSecondaryAction>
<Switch
checked={this.state.badgeDisplaysAllNotifs}
onChange={this.toggleBadgeCount}
/>
<ListItemSecondaryAction>
<Switch
checked={this.state.badgeDisplaysAllNotifs}
onChange={this.toggleBadgeCount}
/>
</ListItemSecondaryAction>
</ListItem>: null
}
</ListItemSecondaryAction>
</ListItem>
</List>
</Paper>
<br/>