Compare commits

..

No commits in common. "a4915a65018cea8a2949d94edc5e199e138b4d26" and "139d43eda547f8e5410bd4c177db0bcfebab1f17" have entirely different histories.

4 changed files with 8 additions and 21 deletions

View file

@ -155,7 +155,6 @@
>
<StillImage
class="image"
:loading="'lazy'"
:referrerpolicy="referrerpolicy"
:mimetype="attachment.mimetype"
:src="attachment.large_thumb_url || attachment.url"

View file

@ -36,7 +36,6 @@ const Search = {
media: [],
hashtags: [],
currenResultTab: 'statuses',
preferredTab : 'statuses',
statusesOffset: 0,
lastStatusFetchCount: 0,
@ -163,26 +162,17 @@ const Search = {
},
onResultTabSwitch (key) {
this.currenResultTab = key
this.preferredTab = key
this.loading = false
},
getActiveTab () {
const available = {
statuses: this.visibleStatuses.length > 0,
media: this.visibleMedia.length > 0,
people: this.users.length > 0,
hashtags: this.hashtags.length > 0,
}
if (available[this.preferredTab]) {
return this.preferredTab
}
const tabOrder = ['statuses', 'media', 'people', 'hashtags']
for (const tab of tabOrder) {
if (available[tab]) {
return tab
}
if (this.visibleStatuses.length > 0) {
return 'statuses'
} else if (this.visibleMedia.length > 0) {
return 'media'
} else if (this.users.length > 0) {
return 'people'
} else if (this.hashtags.length > 0) {
return 'hashtags'
}
return 'statuses'

View file

@ -1,6 +1,5 @@
const StillImage = {
props: [
'loading',
'src',
'referrerpolicy',
'mimetype',

View file

@ -12,7 +12,6 @@
<img
ref="src"
:key="src"
:loading="loading"
:alt="alt"
:title="alt"
:src="src"