Compare commits
No commits in common. "a4915a65018cea8a2949d94edc5e199e138b4d26" and "139d43eda547f8e5410bd4c177db0bcfebab1f17" have entirely different histories.
a4915a6501
...
139d43eda5
4 changed files with 8 additions and 21 deletions
|
@ -155,7 +155,6 @@
|
||||||
>
|
>
|
||||||
<StillImage
|
<StillImage
|
||||||
class="image"
|
class="image"
|
||||||
:loading="'lazy'"
|
|
||||||
:referrerpolicy="referrerpolicy"
|
:referrerpolicy="referrerpolicy"
|
||||||
:mimetype="attachment.mimetype"
|
:mimetype="attachment.mimetype"
|
||||||
:src="attachment.large_thumb_url || attachment.url"
|
:src="attachment.large_thumb_url || attachment.url"
|
||||||
|
|
|
@ -36,7 +36,6 @@ const Search = {
|
||||||
media: [],
|
media: [],
|
||||||
hashtags: [],
|
hashtags: [],
|
||||||
currenResultTab: 'statuses',
|
currenResultTab: 'statuses',
|
||||||
preferredTab : 'statuses',
|
|
||||||
|
|
||||||
statusesOffset: 0,
|
statusesOffset: 0,
|
||||||
lastStatusFetchCount: 0,
|
lastStatusFetchCount: 0,
|
||||||
|
@ -163,26 +162,17 @@ const Search = {
|
||||||
},
|
},
|
||||||
onResultTabSwitch (key) {
|
onResultTabSwitch (key) {
|
||||||
this.currenResultTab = key
|
this.currenResultTab = key
|
||||||
this.preferredTab = key
|
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
getActiveTab () {
|
getActiveTab () {
|
||||||
const available = {
|
if (this.visibleStatuses.length > 0) {
|
||||||
statuses: this.visibleStatuses.length > 0,
|
return 'statuses'
|
||||||
media: this.visibleMedia.length > 0,
|
} else if (this.visibleMedia.length > 0) {
|
||||||
people: this.users.length > 0,
|
return 'media'
|
||||||
hashtags: this.hashtags.length > 0,
|
} else if (this.users.length > 0) {
|
||||||
}
|
return 'people'
|
||||||
|
} else if (this.hashtags.length > 0) {
|
||||||
if (available[this.preferredTab]) {
|
return 'hashtags'
|
||||||
return this.preferredTab
|
|
||||||
}
|
|
||||||
|
|
||||||
const tabOrder = ['statuses', 'media', 'people', 'hashtags']
|
|
||||||
for (const tab of tabOrder) {
|
|
||||||
if (available[tab]) {
|
|
||||||
return tab
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'statuses'
|
return 'statuses'
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
const StillImage = {
|
const StillImage = {
|
||||||
props: [
|
props: [
|
||||||
'loading',
|
|
||||||
'src',
|
'src',
|
||||||
'referrerpolicy',
|
'referrerpolicy',
|
||||||
'mimetype',
|
'mimetype',
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
<img
|
<img
|
||||||
ref="src"
|
ref="src"
|
||||||
:key="src"
|
:key="src"
|
||||||
:loading="loading"
|
|
||||||
:alt="alt"
|
:alt="alt"
|
||||||
:title="alt"
|
:title="alt"
|
||||||
:src="src"
|
:src="src"
|
||||||
|
|
Loading…
Reference in a new issue