MM-39720_Invite People - phase 1

address feedback
This commit is contained in:
Julian Mondragon 2022-11-03 10:15:28 -05:00
parent eef43619fc
commit 51329fb36c
3 changed files with 5 additions and 9 deletions

View file

@ -150,7 +150,7 @@ const ChannelListHeader = ({
bottomSheet({
closeButtonId,
renderContent,
snapPoints: [bottomSheetSnapPoint(items, ITEM_HEIGHT, insets.bottom, separators, SEPARATOR_HEIGHT), 10],
snapPoints: [bottomSheetSnapPoint(items, ITEM_HEIGHT, insets.bottom) + (separators * SEPARATOR_HEIGHT), 10],
theme,
title: intl.formatMessage({id: 'home.header.plus_menu', defaultMessage: 'Options'}),
});

View file

@ -8,7 +8,7 @@ import {switchMap} from 'rxjs/operators';
import {Permissions} from '@constants';
import {observePermissionForTeam} from '@queries/servers/role';
import {observeConfig, observePushVerificationStatus} from '@queries/servers/system';
import {observeConfigBooleanValue, observePushVerificationStatus} from '@queries/servers/system';
import {observeCurrentTeam} from '@queries/servers/team';
import {observeCurrentUser} from '@queries/servers/user';
@ -21,11 +21,7 @@ const enhanced = withObservables([], ({database}: WithDatabaseArgs) => {
const currentUser = observeCurrentUser(database);
const config = observeConfig(database);
const enableOpenServer = config.pipe(
switchMap((t) => of$(t?.EnableOpenServer === 'true')),
);
const enableOpenServer = observeConfigBooleanValue(database, 'EnableOpenServer');
const canJoinChannels = combineLatest([currentUser, team]).pipe(
switchMap(([u, t]) => observePermissionForTeam(database, t, u, Permissions.JOIN_PUBLIC_CHANNELS, true)),

View file

@ -144,12 +144,12 @@ export async function isTablet() {
export const pluckUnique = (key: string) => (array: Array<{[key: string]: unknown}>) => Array.from(new Set(array.map((obj) => obj[key])));
export function bottomSheetSnapPoint(itemsCount: number, itemHeight: number, bottomInset = 0, separatorCount = 0, separatorHeight = 0) {
export function bottomSheetSnapPoint(itemsCount: number, itemHeight: number, bottomInset = 0) {
let bottom = bottomInset;
if (!bottom && Platform.OS === 'ios') {
bottom = IOS_STATUS_BAR_HEIGHT;
}
return ((itemsCount + Platform.select({android: 1, default: 0})) * itemHeight) + (separatorCount * separatorHeight) + (bottom * 2.5);
return ((itemsCount + Platform.select({android: 1, default: 0})) * itemHeight) + (bottom * 2.5);
}
export function hasTrailingSpaces(term: string) {