Fix broken conversation
This commit is contained in:
parent
ed10af15e2
commit
00ba6b7c5d
8 changed files with 47 additions and 26 deletions
2
changelog.d/broken.fix
Normal file
2
changelog.d/broken.fix
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
Fix display of the broken/deleted/banned users
|
||||||
|
|
||||||
|
|
@ -452,7 +452,7 @@ const Status = {
|
||||||
},
|
},
|
||||||
scrobblePresent () {
|
scrobblePresent () {
|
||||||
if (this.mergedConfig.hideScrobbles) return false
|
if (this.mergedConfig.hideScrobbles) return false
|
||||||
if (!this.status.user.latestScrobble) return false
|
if (!this.status.user?.latestScrobble) return false
|
||||||
const value = this.mergedConfig.hideScrobblesAfter.match(/\d+/gs)[0]
|
const value = this.mergedConfig.hideScrobblesAfter.match(/\d+/gs)[0]
|
||||||
const unit = this.mergedConfig.hideScrobblesAfter.match(/\D+/gs)[0]
|
const unit = this.mergedConfig.hideScrobblesAfter.match(/\D+/gs)[0]
|
||||||
let multiplier = 60 * 1000 // minutes is smallest unit
|
let multiplier = 60 * 1000 // minutes is smallest unit
|
||||||
|
|
@ -474,7 +474,7 @@ const Status = {
|
||||||
return this.status.user.latestScrobble.artist
|
return this.status.user.latestScrobble.artist
|
||||||
},
|
},
|
||||||
scrobble () {
|
scrobble () {
|
||||||
return this.status.user.latestScrobble
|
return this.status.user?.latestScrobble
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,10 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
flex: 1 1 0;
|
flex: 1 1 0;
|
||||||
|
|
||||||
|
&.unknown {
|
||||||
|
min-width: 8em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.heading-left {
|
.heading-left {
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,7 @@
|
||||||
class="left-side"
|
class="left-side"
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
|
v-if="status.user?.name"
|
||||||
:href="$router.resolve(userProfileLink).href"
|
:href="$router.resolve(userProfileLink).href"
|
||||||
@click.prevent
|
@click.prevent
|
||||||
>
|
>
|
||||||
|
|
@ -120,10 +121,17 @@
|
||||||
class="post-avatar"
|
class="post-avatar"
|
||||||
:show-actor-type-indicator="showActorTypeIndicator"
|
:show-actor-type-indicator="showActorTypeIndicator"
|
||||||
:compact="compact"
|
:compact="compact"
|
||||||
:user="status.user"
|
:user="status?.user"
|
||||||
/>
|
/>
|
||||||
</UserPopover>
|
</UserPopover>
|
||||||
</a>
|
</a>
|
||||||
|
<UserAvatar
|
||||||
|
v-else
|
||||||
|
:user="status?.user"
|
||||||
|
class="post-avatar"
|
||||||
|
:compact="compact"
|
||||||
|
:title="$t('status.unknown_user_info')"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-side">
|
<div class="right-side">
|
||||||
<div
|
<div
|
||||||
|
|
@ -133,29 +141,31 @@
|
||||||
<div class="heading-name-row">
|
<div class="heading-name-row">
|
||||||
<div class="heading-left">
|
<div class="heading-left">
|
||||||
<h4
|
<h4
|
||||||
v-if="status.user.name_html"
|
|
||||||
class="status-username"
|
class="status-username"
|
||||||
:title="status.user.name"
|
:title="status.user?.name ?? $t('status.unknown_user_info')"
|
||||||
>
|
>
|
||||||
<RichContent
|
<user-link
|
||||||
:html="status.user.name"
|
v-if="status.user?.name"
|
||||||
:emoji="status.user.emoji"
|
class="account-name"
|
||||||
:is-local="status.user.is_local"
|
:title="status.user?.screen_name_ui"
|
||||||
/>
|
:user="status?.user"
|
||||||
|
:at="false"
|
||||||
|
>
|
||||||
|
<RichContent
|
||||||
|
v-if="status.user.name_html"
|
||||||
|
:html="status.user.name"
|
||||||
|
:emoji="status.user.emoji"
|
||||||
|
:is-local="status.user.is_local"
|
||||||
|
/>
|
||||||
|
<span v-else>{{ status.user.name }}</span>
|
||||||
|
</user-link>
|
||||||
|
<span
|
||||||
|
v-else
|
||||||
|
class="account-name unknown"
|
||||||
|
>
|
||||||
|
{{ $t('status.unknown_user') }}
|
||||||
|
</span>
|
||||||
</h4>
|
</h4>
|
||||||
<h4
|
|
||||||
v-else
|
|
||||||
class="status-username"
|
|
||||||
:title="status.user.name"
|
|
||||||
>
|
|
||||||
{{ status.user.name }}
|
|
||||||
</h4>
|
|
||||||
<user-link
|
|
||||||
class="account-name"
|
|
||||||
:title="status.user.screen_name_ui"
|
|
||||||
:user="status.user"
|
|
||||||
:at="false"
|
|
||||||
/>
|
|
||||||
<img
|
<img
|
||||||
v-if="!!(status.user && status.user.favicon)"
|
v-if="!!(status.user && status.user.favicon)"
|
||||||
class="status-favicon"
|
class="status-favicon"
|
||||||
|
|
|
||||||
|
|
@ -1346,6 +1346,8 @@
|
||||||
"show_content": "Show content",
|
"show_content": "Show content",
|
||||||
"hide_content": "Hide content",
|
"hide_content": "Hide content",
|
||||||
"status_deleted": "This post was deleted",
|
"status_deleted": "This post was deleted",
|
||||||
|
"unknown_user": "unknown user",
|
||||||
|
"unknown_user_info": "Unable to fetch information about this user",
|
||||||
"nsfw": "NSFW",
|
"nsfw": "NSFW",
|
||||||
"expand": "Expand",
|
"expand": "Expand",
|
||||||
"you": "(You)",
|
"you": "(You)",
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,10 @@ const sortTimeline = (timeline) => {
|
||||||
|
|
||||||
const getLatestScrobble = (state, user) => {
|
const getLatestScrobble = (state, user) => {
|
||||||
const scrobblesSupport = state.pleromaScrobblesAvailable
|
const scrobblesSupport = state.pleromaScrobblesAvailable
|
||||||
if (!scrobblesSupport) return
|
|
||||||
|
if (!scrobblesSupport || !user.name || user.id === 'undefined') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (state.scrobblesNextFetch[user.id] && state.scrobblesNextFetch[user.id] > Date.now()) {
|
if (state.scrobblesNextFetch[user.id] && state.scrobblesNextFetch[user.id] > Date.now()) {
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ export const muteFilterHits = (muteFilters, status) => {
|
||||||
const statusText = status.text.toLowerCase()
|
const statusText = status.text.toLowerCase()
|
||||||
const statusSummary = status.summary.toLowerCase()
|
const statusSummary = status.summary.toLowerCase()
|
||||||
const replyToUser = status.in_reply_to_screen_name?.toLowerCase()
|
const replyToUser = status.in_reply_to_screen_name?.toLowerCase()
|
||||||
const poster = status.user.screen_name.toLowerCase()
|
const poster = status.user.screen_name?.toLowerCase()
|
||||||
const mentions = (status.attentions || []).map(att => att.screen_name.toLowerCase())
|
const mentions = (status.attentions || []).map(att => att.screen_name.toLowerCase())
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ const highlightStyle = (prefs) => {
|
||||||
|
|
||||||
const highlightClass = (user) => {
|
const highlightClass = (user) => {
|
||||||
return 'USER____' + user.screen_name
|
return 'USER____' + user.screen_name
|
||||||
.replace(/\./g, '_')
|
?.replace(/\./g, '_')
|
||||||
.replace(/@/g, '_AT_')
|
.replace(/@/g, '_AT_')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue