mirror of
https://git.youjo.love/youjo/youjo-fe.git
synced 2024-11-20 05:49:54 +01:00
Merge pull request 'fix realtime updates in 'following' replies filter' (#285) from flisk/akkoma-fe:fix-realtime-reply-filter into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma-fe/pulls/285
This commit is contained in:
commit
6a9764951f
1 changed files with 14 additions and 4 deletions
|
@ -5,15 +5,25 @@ import { map } from 'lodash'
|
|||
const retryTimeout = (multiplier) => 1000 * multiplier
|
||||
|
||||
const isVisible = (store, message, visibility) => {
|
||||
if (visibility === 'all') {
|
||||
if (visibility == 'all') {
|
||||
return true
|
||||
} else if (visibility === 'following') {
|
||||
return store.getters.relationship(message.in_reply_to_user_id).following
|
||||
} else if (visibility === 'self') {
|
||||
}
|
||||
|
||||
if (visibility == 'following') {
|
||||
if (message.in_reply_to_user_id === null) {
|
||||
return true
|
||||
} else {
|
||||
return store.getters.relationship(message.in_reply_to_user_id).following
|
||||
}
|
||||
}
|
||||
|
||||
if (visibility == 'self') {
|
||||
return message.in_reply_to_user_id === store.rootState.users.currentUser.id
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
const api = {
|
||||
state: {
|
||||
retryMultiplier: 1,
|
||||
|
|
Loading…
Reference in a new issue