From 95e74319e11e673ce0a6a53546eae98a0b9c3eb5 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 25 Apr 2021 13:48:23 +0300 Subject: clean warnings from status --- src/components/status_content/status_content.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/components/status_content/status_content.js') diff --git a/src/components/status_content/status_content.js b/src/components/status_content/status_content.js index a6f79d76..a755518c 100644 --- a/src/components/status_content/status_content.js +++ b/src/components/status_content/status_content.js @@ -33,7 +33,8 @@ const StatusContent = { 'focused', 'noHeading', 'fullContent', - 'singleLine' + 'singleLine', + 'compact' ], data () { return { -- cgit v1.2.3-70-g09d2 From 4b630c3c36518853489009c27602bdae392b4c94 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 28 Mar 2022 17:37:26 +0300 Subject: fix warnings --- src/components/status/status.js | 4 ++-- src/components/status_content/status_content.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/components/status_content/status_content.js') diff --git a/src/components/status/status.js b/src/components/status/status.js index 088ddcc5..ee0da4dc 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -69,7 +69,7 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => { const controlledName = `controlled${camelized}` const uncontrolledName = `uncontrolled${camelized}` res[name] = function () { - return this[toggle] ? this[controlledName] : this[uncontrolledName] + return (Object.getOwnPropertyDescriptor(this, toggle) && this[toggle]) ? this[controlledName] : this[uncontrolledName] } return res }, {}) @@ -311,7 +311,7 @@ const Status = { return this.mergedConfig.hideWordFilteredPosts }, hideStatus () { - return (this.virtualHidden || !this.shouldNotMute) && ( + return (!this.shouldNotMute) && ( (this.muted && this.hideFilteredStatuses) || (this.userIsMuted && this.hideMutedUsers) || (this.status.thread_muted && this.hideMutedThreads) || diff --git a/src/components/status_content/status_content.js b/src/components/status_content/status_content.js index cf72ccb8..0200382b 100644 --- a/src/components/status_content/status_content.js +++ b/src/components/status_content/status_content.js @@ -31,7 +31,7 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => { const controlledName = `controlled${camelized}` const uncontrolledName = `uncontrolled${camelized}` res[name] = function () { - return this[toggle] ? this[controlledName] : this[uncontrolledName] + return (Object.getOwnPropertyDescriptor(this, toggle) && this[toggle]) ? this[controlledName] : this[uncontrolledName] } return res }, {}) -- cgit v1.2.3-70-g09d2 From 3799983d4f89cad4dbf4595f49a768a66b72b07e Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 29 Mar 2022 12:41:34 +0300 Subject: fix production build's reply not working in tree mode --- src/components/status/status.js | 2 +- src/components/status_content/status_content.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/status_content/status_content.js') diff --git a/src/components/status/status.js b/src/components/status/status.js index ee0da4dc..c6b24c72 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -69,7 +69,7 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => { const controlledName = `controlled${camelized}` const uncontrolledName = `uncontrolled${camelized}` res[name] = function () { - return (Object.getOwnPropertyDescriptor(this, toggle) && this[toggle]) ? this[controlledName] : this[uncontrolledName] + return (this.$props[toggle] && this[toggle]) ? this[controlledName] : this[uncontrolledName] } return res }, {}) diff --git a/src/components/status_content/status_content.js b/src/components/status_content/status_content.js index 0200382b..f47d036a 100644 --- a/src/components/status_content/status_content.js +++ b/src/components/status_content/status_content.js @@ -31,7 +31,7 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => { const controlledName = `controlled${camelized}` const uncontrolledName = `uncontrolled${camelized}` res[name] = function () { - return (Object.getOwnPropertyDescriptor(this, toggle) && this[toggle]) ? this[controlledName] : this[uncontrolledName] + return (this.$props[toggle] && this[toggle]) ? this[controlledName] : this[uncontrolledName] } return res }, {}) -- cgit v1.2.3-70-g09d2 From e1483488c7982daa9272c570f0a5a9296519ef31 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 29 Mar 2022 19:23:30 +0300 Subject: fix some issues with trees --- src/components/status/status.js | 2 +- src/components/status_content/status_content.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/status_content/status_content.js') diff --git a/src/components/status/status.js b/src/components/status/status.js index c6b24c72..ec0bd25a 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -69,7 +69,7 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => { const controlledName = `controlled${camelized}` const uncontrolledName = `uncontrolled${camelized}` res[name] = function () { - return (this.$props[toggle] && this[toggle]) ? this[controlledName] : this[uncontrolledName] + return (this.$props[toggle] !== undefined && this[toggle]) ? this[controlledName] : this[uncontrolledName] } return res }, {}) diff --git a/src/components/status_content/status_content.js b/src/components/status_content/status_content.js index f47d036a..68e75d9e 100644 --- a/src/components/status_content/status_content.js +++ b/src/components/status_content/status_content.js @@ -31,7 +31,7 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => { const controlledName = `controlled${camelized}` const uncontrolledName = `uncontrolled${camelized}` res[name] = function () { - return (this.$props[toggle] && this[toggle]) ? this[controlledName] : this[uncontrolledName] + return (this.$props[toggle] !== undefined && this[toggle]) ? this[controlledName] : this[uncontrolledName] } return res }, {}) -- cgit v1.2.3-70-g09d2 From de2f9686452b2bcb6cfe08fe9a5b648ec6bd5ed2 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 29 Mar 2022 19:44:07 +0300 Subject: fix? --- src/components/status/status.js | 2 +- src/components/status_content/status_content.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/status_content/status_content.js') diff --git a/src/components/status/status.js b/src/components/status/status.js index ec0bd25a..a925f30b 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -69,7 +69,7 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => { const controlledName = `controlled${camelized}` const uncontrolledName = `uncontrolled${camelized}` res[name] = function () { - return (this.$props[toggle] !== undefined && this[toggle]) ? this[controlledName] : this[uncontrolledName] + return ((this.$data[toggle] !== undefined || this.$props[toggle] !== undefined) && this[toggle]) ? this[controlledName] : this[uncontrolledName] } return res }, {}) diff --git a/src/components/status_content/status_content.js b/src/components/status_content/status_content.js index 68e75d9e..e69c3afd 100644 --- a/src/components/status_content/status_content.js +++ b/src/components/status_content/status_content.js @@ -31,7 +31,7 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => { const controlledName = `controlled${camelized}` const uncontrolledName = `uncontrolled${camelized}` res[name] = function () { - return (this.$props[toggle] !== undefined && this[toggle]) ? this[controlledName] : this[uncontrolledName] + return ((this.$data[toggle] !== undefined || this.$props[toggle] !== undefined) && this[toggle]) ? this[controlledName] : this[uncontrolledName] } return res }, {}) -- cgit v1.2.3-70-g09d2 From b84acfd7b75337f8999adad7b1a670630e9ee36d Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Tue, 29 Mar 2022 13:56:42 -0400 Subject: Add controlledShowingLongSubject and toggle in StatusContent props --- src/components/status_content/status_content.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/components/status_content/status_content.js') diff --git a/src/components/status_content/status_content.js b/src/components/status_content/status_content.js index e69c3afd..89f0aa51 100644 --- a/src/components/status_content/status_content.js +++ b/src/components/status_content/status_content.js @@ -59,7 +59,9 @@ const StatusContent = { 'controlledShowingTall', 'controlledExpandingSubject', 'controlledToggleShowingTall', - 'controlledToggleExpandingSubject' + 'controlledToggleExpandingSubject', + 'controlledShowingLongSubject', + 'controlledToggleShowingLongSubject' ], data () { return { -- cgit v1.2.3-70-g09d2