deep-copy update private and public fields

This commit is contained in:
or-else
2019-02-01 18:37:07 +03:00
parent f34c342db3
commit 6388fedd70
9 changed files with 1688 additions and 2974 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+1660 -2953
View File
File diff suppressed because it is too large Load Diff
+7 -6
View File
@@ -3,16 +3,17 @@
"description": "Tinode messenger for the web", "description": "Tinode messenger for the web",
"version": "0.15.12", "version": "0.15.12",
"devDependencies": { "devDependencies": {
"@babel/core": "^7.1.2", "@babel/core": "^7.2.2",
"@babel/preset-env": "^7.1.0", "@babel/preset-env": "^7.3.1",
"@babel/preset-react": "^7.0.0", "@babel/preset-react": "^7.0.0",
"babel-loader": "^8.0.4", "babel-loader": "^8.0.5",
"babel-plugin-react-intl": "^3.0.1", "babel-plugin-react-intl": "^3.0.1",
"browserslist": "^4.4.1", "browserslist": "^4.4.1",
"cssnano": "^4.0.5", "cssnano": "^4.1.8",
"postcss": "^7.0.6", "postcss": "^7.0.6",
"webpack": "^4.23.1", "uglifyjs-webpack-plugin": "^2.1.1",
"webpack-cli": "^3.1.2" "webpack": "^4.29.0",
"webpack-cli": "^3.2.1"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
+6 -4
View File
@@ -69,10 +69,12 @@ self.addEventListener('notificationclick', function(event) {
// This is needed for 'Add to Home Screen'. // This is needed for 'Add to Home Screen'.
self.addEventListener('fetch', function(event) { self.addEventListener('fetch', function(event) {
if (event.request.cache === 'only-if-cached' && event.request.mode !== 'same-origin') { console.log("Fetch event", event.request);
return; // Workaround for https://bugs.chromium.org/p/chromium/issues/detail?id=823392
} if (event.request.cache == 'only-if-cached' && event.request.mode != 'same-origin') {
event.respondWith( return;
}
event.respondWith(
// Try to find response in cache. // Try to find response in cache.
caches.match(event.request) caches.match(event.request)
.then((resp) => { .then((resp) => {
+3 -2
View File
@@ -993,7 +993,7 @@ class TinodeWeb extends React.Component {
const topic = this.tinode.getTopic(topicName); const topic = this.tinode.getTopic(topicName);
const {formatMessage} = this.props.intl; const {formatMessage} = this.props.intl;
let muted = false, blocked = false, subscribed = false, deleter = false; let muted = false, blocked = false, subscribed = false, deleter = false, archived = false;
if (topic) { if (topic) {
if (topic.isSubscribed()) { if (topic.isSubscribed()) {
subscribed = true; subscribed = true;
@@ -1003,6 +1003,7 @@ class TinodeWeb extends React.Component {
blocked = acs && !acs.isJoiner(); blocked = acs && !acs.isJoiner();
deleter = acs && acs.isDeleter(); deleter = acs && acs.isDeleter();
} }
archived = topic.isArchived();
} }
return [ return [
@@ -1011,7 +1012,7 @@ class TinodeWeb extends React.Component {
subscribed && deleter ? 'messages_clear_hard' : null, subscribed && deleter ? 'messages_clear_hard' : null,
subscribed ? (muted ? 'topic_unmute' : 'topic_mute') : null, subscribed ? (muted ? 'topic_unmute' : 'topic_mute') : null,
subscribed ? (blocked ? 'topic_unblock' : 'topic_block') : null, subscribed ? (blocked ? 'topic_unblock' : 'topic_block') : null,
subscribed && !topic.isArchived() ? 'topic_archive' : null, subscribed && !archived ? 'topic_archive' : null,
'topic_delete' 'topic_delete'
]; ];
} }
+8 -5
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
+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