build: Update matrix dart sdk to 0.40.0
Signed-off-by: Christian Kußowski <c.kussowski@famedly.com>
This commit is contained in:
parent
9a5bb2a0db
commit
8664f21ad8
10 changed files with 53 additions and 159 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
/// This is a temporary helper class until there is a proper solution to this with the new system
|
||||
|
|
@ -350,4 +351,21 @@ class MatrixLocals extends MatrixLocalizations {
|
|||
|
||||
@override
|
||||
String get cancelledSend => l10n.sendCanceled;
|
||||
|
||||
@override
|
||||
String voiceMessage(String senderName, Duration? duration) {
|
||||
final dateTime = duration == null
|
||||
? null
|
||||
: DateTime.fromMillisecondsSinceEpoch(
|
||||
duration.inSeconds * 1000,
|
||||
);
|
||||
final formattedDuration = dateTime == null
|
||||
? ''
|
||||
: DateFormat(
|
||||
DateFormat.MINUTE_SECOND,
|
||||
l10n.localeName,
|
||||
).format(dateTime);
|
||||
|
||||
return l10n.sentVoiceMessage(senderName, formattedDuration);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue