more actions without subscribing first

This commit is contained in:
or-else
2019-02-24 11:08:52 +03:00
parent fd32413ba1
commit 7e0aa5b93b
6 changed files with 22 additions and 25 deletions
+8 -8
View File
@@ -1022,15 +1022,15 @@ class TinodeWeb extends React.Component {
let muted = false, blocked = false, subscribed = false, deleter = false, archived = false;
if (topic) {
if (topic.isSubscribed()) {
subscribed = true;
const acs = topic.getAccessMode();
muted = acs && acs.isMuted();
blocked = acs && !acs.isJoiner();
deleter = acs && acs.isDeleter();
}
subscribed = topic.isSubscribed();
archived = topic.isArchived();
const acs = topic.getAccessMode();
if (acs) {
muted = acs.isMuted();
blocked = !acs.isJoiner();
deleter = acs.isDeleter();
}
}
return [
+3 -6
View File
@@ -3,11 +3,8 @@ import React from 'react';
export default class UnreadBadge extends React.PureComponent {
render() {
var showUnreadBadge = null;
if (this.props.count > 0) {
var count = this.props.count > 9 ? "9+" : this.props.count;
showUnreadBadge = <span className="unread">{count}</span>;
}
return showUnreadBadge;
return (this.props.count > 0 ?
<span className="unread">{this.props.count > 9 ? "9+" : this.props.count}</span>
: null);
}
};
+8 -8
View File
@@ -5095,15 +5095,15 @@ var TinodeWeb = function (_React$Component) {
archived = false;
if (topic) {
if (topic.isSubscribed()) {
subscribed = true;
var acs = topic.getAccessMode();
muted = acs && acs.isMuted();
blocked = acs && !acs.isJoiner();
deleter = acs && acs.isDeleter();
}
subscribed = topic.isSubscribed();
archived = topic.isArchived();
var acs = topic.getAccessMode();
if (acs) {
muted = acs.isMuted();
blocked = !acs.isJoiner();
deleter = acs.isDeleter();
}
}
return [subscribed ? {
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long