Commit 1f4ad26d authored by Sebastian Trebunak's avatar Sebastian Trebunak
Browse files

Added video + Notification date minutes formatting should be working now

parent cc6101aa
......@@ -36,6 +36,10 @@ export default class NotificationDate extends PureComponent {
});
}
minutesFormatting(minutes) {
return minutes < 10 ? "0" + minutes : minutes;
}
timeStampToString = () => {
const current = new Date();
const required = new Date(this.props.timeStamp);
......@@ -44,7 +48,9 @@ export default class NotificationDate extends PureComponent {
const diffDays = Math.ceil(diffTime / MILLISECONDS_IN_DAY);
if (diffDays <= 1 && required.getDay() == current.getDay()) {
return `${required.getHours()}:${required.getMinutes()}`;
return `${required.getHours()}:${this.minutesFormatting(
required.getMinutes()
)}`;
} else if (diffDays === 1) {
return "Včera";
} else if (diffDays > 1 && diffDays < 7) {
......
......@@ -13,6 +13,9 @@ import { iOSUIKit } from "react-native-typography";
import NotificationListItem from "../components/notifications/NotificationListItem";
import KeywordsList from "../components/notifications/KeywordsList";
const VIDEO_URI =
"https://www.fbi.gov/video-repository/newss-mp4-patty-hearst-bank-robbery/@@download/file/patty-hearst-bank-robbery.mp4";
export default class NotificationInfoScreen extends Component {
static navigationOptions = {
title: "Upozornenie"
......@@ -43,7 +46,7 @@ export default class NotificationInfoScreen extends Component {
<Text style={styles.title}>Video</Text>
<Video
source={{
uri: data.videoUri
uri: VIDEO_URI
}}
rate={1.0}
volume={1.0}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment