more actions without subscribing first
This commit is contained in:
@@ -1022,15 +1022,15 @@ class TinodeWeb extends React.Component {
|
|||||||
|
|
||||||
let muted = false, blocked = false, subscribed = false, deleter = false, archived = false;
|
let muted = false, blocked = false, subscribed = false, deleter = false, archived = false;
|
||||||
if (topic) {
|
if (topic) {
|
||||||
if (topic.isSubscribed()) {
|
subscribed = topic.isSubscribed();
|
||||||
subscribed = true;
|
|
||||||
|
|
||||||
const acs = topic.getAccessMode();
|
|
||||||
muted = acs && acs.isMuted();
|
|
||||||
blocked = acs && !acs.isJoiner();
|
|
||||||
deleter = acs && acs.isDeleter();
|
|
||||||
}
|
|
||||||
archived = topic.isArchived();
|
archived = topic.isArchived();
|
||||||
|
|
||||||
|
const acs = topic.getAccessMode();
|
||||||
|
if (acs) {
|
||||||
|
muted = acs.isMuted();
|
||||||
|
blocked = !acs.isJoiner();
|
||||||
|
deleter = acs.isDeleter();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|||||||
@@ -3,11 +3,8 @@ import React from 'react';
|
|||||||
|
|
||||||
export default class UnreadBadge extends React.PureComponent {
|
export default class UnreadBadge extends React.PureComponent {
|
||||||
render() {
|
render() {
|
||||||
var showUnreadBadge = null;
|
return (this.props.count > 0 ?
|
||||||
if (this.props.count > 0) {
|
<span className="unread">{this.props.count > 9 ? "9+" : this.props.count}</span>
|
||||||
var count = this.props.count > 9 ? "9+" : this.props.count;
|
: null);
|
||||||
showUnreadBadge = <span className="unread">{count}</span>;
|
|
||||||
}
|
|
||||||
return showUnreadBadge;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+8
-8
@@ -5095,15 +5095,15 @@ var TinodeWeb = function (_React$Component) {
|
|||||||
archived = false;
|
archived = false;
|
||||||
|
|
||||||
if (topic) {
|
if (topic) {
|
||||||
if (topic.isSubscribed()) {
|
subscribed = topic.isSubscribed();
|
||||||
subscribed = true;
|
|
||||||
var acs = topic.getAccessMode();
|
|
||||||
muted = acs && acs.isMuted();
|
|
||||||
blocked = acs && !acs.isJoiner();
|
|
||||||
deleter = acs && acs.isDeleter();
|
|
||||||
}
|
|
||||||
|
|
||||||
archived = topic.isArchived();
|
archived = topic.isArchived();
|
||||||
|
var acs = topic.getAccessMode();
|
||||||
|
|
||||||
|
if (acs) {
|
||||||
|
muted = acs.isMuted();
|
||||||
|
blocked = !acs.isJoiner();
|
||||||
|
deleter = acs.isDeleter();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [subscribed ? {
|
return [subscribed ? {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user