Apply "public" filters for hashtag timeline
This commit is contained in:
parent
e1434e15d9
commit
1cdc4ebbe8
1 changed files with 6 additions and 2 deletions
|
@ -14,6 +14,7 @@ import MenuConfirm from '../components/menu-confirm';
|
||||||
import { SHORTCUTS_LIMIT } from '../components/shortcuts-settings';
|
import { SHORTCUTS_LIMIT } from '../components/shortcuts-settings';
|
||||||
import Timeline from '../components/timeline';
|
import Timeline from '../components/timeline';
|
||||||
import { api } from '../utils/api';
|
import { api } from '../utils/api';
|
||||||
|
import { filteredItems } from '../utils/filters';
|
||||||
import showToast from '../utils/show-toast';
|
import showToast from '../utils/show-toast';
|
||||||
import states from '../utils/states';
|
import states from '../utils/states';
|
||||||
import { saveStatus } from '../utils/states';
|
import { saveStatus } from '../utils/states';
|
||||||
|
@ -71,12 +72,13 @@ function Hashtags({ media: mediaView, columnMode, ...props }) {
|
||||||
onlyMedia: media,
|
onlyMedia: media,
|
||||||
})
|
})
|
||||||
.next();
|
.next();
|
||||||
const { value } = results;
|
let { value } = results;
|
||||||
if (value?.length) {
|
if (value?.length) {
|
||||||
if (firstLoad) {
|
if (firstLoad) {
|
||||||
latestItem.current = value[0].id;
|
latestItem.current = value[0].id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
value = filteredItems(value, 'public');
|
||||||
value.forEach((item) => {
|
value.forEach((item) => {
|
||||||
saveStatus(item, instance, {
|
saveStatus(item, instance, {
|
||||||
skipThreading: media, // If media view, no need to form threads
|
skipThreading: media, // If media view, no need to form threads
|
||||||
|
@ -102,7 +104,8 @@ function Hashtags({ media: mediaView, columnMode, ...props }) {
|
||||||
onlyMedia: media,
|
onlyMedia: media,
|
||||||
})
|
})
|
||||||
.next();
|
.next();
|
||||||
const { value } = results;
|
let { value } = results;
|
||||||
|
value = filteredItems(value, 'public');
|
||||||
if (value?.length) {
|
if (value?.length) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -150,6 +153,7 @@ function Hashtags({ media: mediaView, columnMode, ...props }) {
|
||||||
useItemID
|
useItemID
|
||||||
view={media ? 'media' : undefined}
|
view={media ? 'media' : undefined}
|
||||||
refresh={media}
|
refresh={media}
|
||||||
|
allowFilters
|
||||||
headerEnd={
|
headerEnd={
|
||||||
<Menu2
|
<Menu2
|
||||||
portal
|
portal
|
||||||
|
|
Loading…
Add table
Reference in a new issue