Show video events in chat overview

parent 2e45b275
{
"@@last_modified": "2020-06-06T18:19:25.574081",
"@@last_modified": "2020-06-20T20:22:21.601164",
"appName": "Pattle",
"@appName": {
"type": "text",
......@@ -35,6 +35,11 @@
"type": "text",
"placeholders": {}
},
"_Common_video": "Video",
"@_Common_video": {
"type": "text",
"placeholders": {}
},
"_Common_you": "You",
"@_Common_you": {
"description": "Used to denote the user using the app instead of their name",
......
......@@ -35,6 +35,11 @@
"type": "text",
"placeholders": {}
},
"_Common_video": "Video",
"@_Common_video": {
"type": "text",
"placeholders": {}
},
"_Common_you": "Jij",
"@_Common_you": {
"description": "Used to denote the user using the app instead of their name",
......
......@@ -294,6 +294,14 @@ class _Common extends _Category {
);
}
String get video {
return Intl.message(
'Video',
name: '_Common_video',
locale: _localeName,
);
}
String get you {
return Intl.message(
'You',
......
......@@ -153,6 +153,7 @@ class MessageLookup extends MessageLookupByLibrary {
"_Common_password": MessageLookupByLibrary.simpleMessage("Password"),
"_Common_photo": MessageLookupByLibrary.simpleMessage("Photo"),
"_Common_username": MessageLookupByLibrary.simpleMessage("Username"),
"_Common_video": MessageLookupByLibrary.simpleMessage("Video"),
"_Common_you": MessageLookupByLibrary.simpleMessage("You"),
"_Error_anErrorHasOccurred":
MessageLookupByLibrary.simpleMessage("An error has occurred:"),
......
......@@ -25,6 +25,13 @@ class MessageLookup extends MessageLookupByLibrary {
static m1(count) =>
"${Intl.plural(count, zero: 'Geen deelnemers', one: '${count} deelnemer', other: '${count} deelnemers')}";
static m2(isChannel) => "${Intl.select(isChannel, {
'true':
'Mensen kunnen een adres van een kanaal gebruiken om dit kanaal te vinden en deel te nemen.',
'false':
'Mensen kunnen een adres van een groep gebruiken om deze groep te vinden.',
})}";
static m3(person, bannee, banner) => "${Intl.select(person, {
'secondOnSecond': 'Je bent door jezelf verbannen',
'secondOnThird': 'Je bent verbannen door ${banner}',
......@@ -103,6 +110,9 @@ class MessageLookup extends MessageLookupByLibrary {
"_ChatDetails_noDescriptionSet": MessageLookupByLibrary.simpleMessage(
"Er is geen beschrijving ingesteld"),
"_ChatDetails_participants": m1,
"_ChatDetails_publicAddress":
MessageLookupByLibrary.simpleMessage("Openbaar adres"),
"_ChatDetails_publicAddressInfo": m2,
"_ChatMessage_ban": m3,
"_ChatMessage_creation": m4,
"_ChatMessage_deletion": m5,
......
// Copyright (C) 2020 Wilko Manger
//
// This file is part of Pattle.
//
// Pattle is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Pattle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with Pattle. If not, see <https://www.gnu.org/licenses/>.
import 'package:flutter/material.dart';
import '../../../../../../resources/intl/localizations.dart';
import '../../../../widgets/message_state.dart';
import '../subtitle.dart';
class VideoSubtitleContent extends Subtitle {
@override
Widget build(BuildContext context) {
final message = Subtitle.of(context).chat.latestMessage;
return Row(
children: <Widget>[
if (MessageState.necessary(message)) MessageState(message: message),
if (Sender.necessary(context)) Sender(),
Icon(Icons.videocam),
Expanded(
child: Text(' ${context.intl.common.video}'),
),
],
);
}
}
......@@ -34,6 +34,7 @@ import '../../../chat/widgets/bubble/state/content/upgrade.dart';
import '../typing_content.dart';
import 'content/image.dart';
import 'content/video.dart';
import 'content/redacted.dart';
import 'content/text.dart';
import 'content/unsupported.dart';
......@@ -57,6 +58,8 @@ class Subtitle extends StatelessWidget {
content = TextSubtitleContent();
} else if (event is ImageMessageEvent) {
content = ImageSubtitleContent();
} else if (event is VideoMessageEvent) {
content = VideoSubtitleContent();
} else if (event is MemberChangeEvent) {
content = MemberChangeContent(message: chat.latestMessage);
} else if (event is RedactedEvent) {
......
Markdown is supported
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