Remove svg usage for user status (#1486)
* Remove SVG usage for status indicators to speedup channel loading * Add needed assets for status icons (72x72) * correct folder name * Delete offline.png * Delete dnd.png * Delete online.png * Delete away.png * make icons white * correct size
This commit is contained in:
parent
f1ea485ba0
commit
3a3be22af0
5 changed files with 12 additions and 10 deletions
|
|
@ -2,17 +2,20 @@
|
|||
// See License.txt for license information.
|
||||
|
||||
import React, {PureComponent} from 'react';
|
||||
import {Image} from 'react-native';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import {General} from 'mattermost-redux/constants';
|
||||
|
||||
import {AwayIcon, DndIcon, OfflineIcon, OnlineIcon} from 'app/components/status_icons';
|
||||
import away from 'assets/images/status/away.png';
|
||||
import dnd from 'assets/images/status/dnd.png';
|
||||
import offline from 'assets/images/status/offline.png';
|
||||
import online from 'assets/images/status/online.png';
|
||||
|
||||
const statusToIcon = {
|
||||
away: AwayIcon,
|
||||
dnd: DndIcon,
|
||||
offline: OfflineIcon,
|
||||
online: OnlineIcon,
|
||||
away,
|
||||
dnd,
|
||||
offline,
|
||||
online,
|
||||
};
|
||||
|
||||
export default class UserStatus extends PureComponent {
|
||||
|
|
@ -48,10 +51,9 @@ export default class UserStatus extends PureComponent {
|
|||
}
|
||||
|
||||
return (
|
||||
<Icon
|
||||
height={size}
|
||||
width={size}
|
||||
color={iconColor}
|
||||
<Image
|
||||
source={Icon}
|
||||
style={{height: size, width: size, tintColor: iconColor}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
BIN
assets/base/images/status/away.png
Normal file
BIN
assets/base/images/status/away.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 979 B |
BIN
assets/base/images/status/dnd.png
Normal file
BIN
assets/base/images/status/dnd.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 818 B |
BIN
assets/base/images/status/offline.png
Normal file
BIN
assets/base/images/status/offline.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/base/images/status/online.png
Normal file
BIN
assets/base/images/status/online.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in a new issue