2018-01-16 20:27:57 +00:00
|
|
|
import React from 'react';
|
2018-02-08 14:08:50 +00:00
|
|
|
import { View, StyleSheet, Text, LayoutAnimation } from 'react-native';
|
2018-06-01 17:38:13 +00:00
|
|
|
import I18n from '../../i18n';
|
2018-01-16 20:27:57 +00:00
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
firstUnread: {
|
|
|
|
flex: 1,
|
|
|
|
flexDirection: 'row',
|
|
|
|
alignItems: 'center',
|
2018-04-24 19:34:03 +00:00
|
|
|
marginVertical: -7
|
2018-01-16 20:27:57 +00:00
|
|
|
},
|
|
|
|
firstUnreadLine: {
|
|
|
|
borderTopColor: 'red',
|
|
|
|
borderTopWidth: StyleSheet.hairlineWidth,
|
|
|
|
flex: 1
|
|
|
|
},
|
|
|
|
firstUnreadBadge: {
|
|
|
|
color: 'red',
|
|
|
|
backgroundColor: '#fff',
|
|
|
|
fontSize: 11,
|
|
|
|
paddingHorizontal: 10,
|
|
|
|
transform: [{ scaleY: -1 }]
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2018-02-08 14:08:50 +00:00
|
|
|
export default class UnreadSeparator extends React.PureComponent {
|
|
|
|
componentWillUnmount() {
|
|
|
|
LayoutAnimation.linear();
|
|
|
|
}
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<View style={styles.firstUnread}>
|
|
|
|
<View style={styles.firstUnreadLine} />
|
2018-06-01 17:38:13 +00:00
|
|
|
<Text style={styles.firstUnreadBadge}>{I18n.t('unread_messages')}</Text>
|
2018-02-08 14:08:50 +00:00
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|