This commit is contained in:
mgabdev
2020-04-11 18:29:19 -04:00
parent 7249143d9f
commit 595208780e
160 changed files with 1678 additions and 2103 deletions

View File

@@ -102,7 +102,7 @@ export function fetchAccount(id) {
return (dispatch, getState) => {
dispatch(fetchRelationships([id]));
if (getState().getIn(['accounts', id], null) !== null) {
if (id === -1 || getState().getIn(['accounts', id], null) !== null) {
return;
}

View File

@@ -165,9 +165,12 @@ export function expandNotifications({ maxId } = {}, done = noOp) {
// filter verified and following here too
const params = {
max_id: maxId,
only_verified: onlyVerified,
only_following: onlyFollowing,
exclude_types: activeFilter === 'all' ? [] : excludeTypesFromFilter(activeFilter),
// only_verified: onlyVerified,
// only_following: onlyFollowing,
exclude_types: activeFilter === 'all' ? null : excludeTypesFromFilter(activeFilter),
// exclude_types: activeFilter === 'all'
// ? excludeTypesFromSettings(getState())
// : excludeTypesFromFilter(activeFilter),
};
if (!maxId && notifications.get('items').size > 0) {
@@ -176,6 +179,8 @@ export function expandNotifications({ maxId } = {}, done = noOp) {
dispatch(expandNotificationsRequest(isLoadingMore));
console.log("params:", params)
api(getState).get('/api/v1/notifications', { params }).then(response => {
const next = getLinks(response).refs.find(link => link.rel === 'next');

View File

@@ -1,15 +1,17 @@
import api from '../api';
import { importFetchedAccounts } from './importer';
import { me } from '../initial_state';
import api from '../api'
import { importFetchedAccounts } from './importer'
import { me } from '../initial_state'
export const SUGGESTIONS_FETCH_REQUEST = 'SUGGESTIONS_FETCH_REQUEST';
export const SUGGESTIONS_FETCH_SUCCESS = 'SUGGESTIONS_FETCH_SUCCESS';
export const SUGGESTIONS_FETCH_FAIL = 'SUGGESTIONS_FETCH_FAIL';
export const SUGGESTIONS_FETCH_REQUEST = 'SUGGESTIONS_FETCH_REQUEST'
export const SUGGESTIONS_FETCH_SUCCESS = 'SUGGESTIONS_FETCH_SUCCESS'
export const SUGGESTIONS_FETCH_FAIL = 'SUGGESTIONS_FETCH_FAIL'
export const SUGGESTIONS_DISMISS = 'SUGGESTIONS_DISMISS';
export function fetchSuggestions() {
return (dispatch, getState) => {
if (!me) return false
dispatch(fetchSuggestionsRequest());
api(getState).get('/api/v1/suggestions').then(response => {