Merge branch 'followers-tsx' into 'develop'
Followers/Following: convert to TSX See merge request soapbox-pub/soapbox!1784
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import { Map as ImmutableMap, OrderedSet as ImmutableOrderedSet } from 'immutable';
|
||||
|
||||
import type { Account } from 'soapbox/types/entities';
|
||||
|
||||
const getDomainFromURL = (account: Account): string => {
|
||||
@@ -28,12 +26,6 @@ export const getAcct = (account: Account, displayFqn: boolean): string => (
|
||||
displayFqn === true ? account.fqn : account.acct
|
||||
);
|
||||
|
||||
export const getFollowDifference = (state: ImmutableMap<string, any>, accountId: string, type: string): number => {
|
||||
const items: any = state.getIn(['user_lists', type, accountId, 'items'], ImmutableOrderedSet());
|
||||
const counter: number = Number(state.getIn(['accounts_counters', accountId, `${type}_count`], 0));
|
||||
return Math.max(counter - items.size, 0);
|
||||
};
|
||||
|
||||
export const isLocal = (account: Account): boolean => {
|
||||
const domain: string = account.acct.split('@')[1];
|
||||
return domain === undefined ? true : false;
|
||||
|
||||
Reference in New Issue
Block a user