forked from Ivasoft/mattermost-mobile
Gekidou Android share extension (#6803)
* Refactor app database queries to not require the app database as argument * Android Share Extension and fix notifications prompt * feedback review
This commit is contained in:
@@ -194,6 +194,20 @@ export function alertServerAlreadyConnected(intl: IntlShape) {
|
||||
);
|
||||
}
|
||||
|
||||
export const sortServersByDisplayName = (servers: ServersModel[], intl: IntlShape) => {
|
||||
function serverName(s: ServersModel) {
|
||||
if (s.displayName === s.url) {
|
||||
return intl.formatMessage({id: 'servers.default', defaultMessage: 'Default Server'});
|
||||
}
|
||||
|
||||
return s.displayName;
|
||||
}
|
||||
|
||||
return servers.sort((a, b) => {
|
||||
return serverName(a).localeCompare(serverName(b));
|
||||
});
|
||||
};
|
||||
|
||||
function unsupportedServerAdminAlert(serverDisplayName: string, intl: IntlShape, onPress?: () => void) {
|
||||
const title = intl.formatMessage({id: 'mobile.server_upgrade.title', defaultMessage: 'Server upgrade required'});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user