forked from Ivasoft/mattermost-mobile
Add command autocomplete
This commit is contained in:
@@ -175,3 +175,5 @@ export const makeCallErrorResponse = (errMessage: string) => {
|
||||
error: errMessage,
|
||||
};
|
||||
};
|
||||
|
||||
export const filterEmptyOptions = (option: AppSelectOption): boolean => Boolean(option.value && !option.value.match(/^[ \t]+$/));
|
||||
|
||||
@@ -62,6 +62,9 @@ export function buildQueryString(parameters: Dictionary<any>): string {
|
||||
let query = '?';
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
const key = keys[i];
|
||||
if (parameters[key] == null) {
|
||||
continue;
|
||||
}
|
||||
query += key + '=' + encodeURIComponent(parameters[key]);
|
||||
|
||||
if (i < keys.length - 1) {
|
||||
|
||||
@@ -192,8 +192,8 @@ export function confirmOutOfOfficeDisabled(intl: IntlShape, status: string, upda
|
||||
);
|
||||
}
|
||||
|
||||
export function isShared(user: UserProfile): boolean {
|
||||
return Boolean(user.remote_id);
|
||||
export function isShared(user: UserProfile | UserModel): boolean {
|
||||
return 'remote_id' in user ? Boolean(user.remote_id) : false;
|
||||
}
|
||||
|
||||
export function removeUserFromList(userId: string, originalList: UserProfile[]): UserProfile[] {
|
||||
|
||||
Reference in New Issue
Block a user