mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-25 23:12:37 +01:00
Merge branch 'krille/waveformfollowup' into 'main'
chore: Waveform follow up See merge request famedly/fluffychat!661
This commit is contained in:
commit
8afb39f1ff
@ -142,7 +142,7 @@ class _AudioPlayerState extends State<AudioPlayerWidget> {
|
|||||||
return '${duration.inMinutes.toString().padLeft(2, '0')}:${(duration.inSeconds % 60).toString().padLeft(2, '0')}';
|
return '${duration.inMinutes.toString().padLeft(2, '0')}:${(duration.inSeconds % 60).toString().padLeft(2, '0')}';
|
||||||
}
|
}
|
||||||
|
|
||||||
List<int> get waveform {
|
List<int> _getWaveform() {
|
||||||
final eventWaveForm = widget.event.content
|
final eventWaveForm = widget.event.content
|
||||||
.tryGetMap<String, dynamic>('org.matrix.msc1767.audio')
|
.tryGetMap<String, dynamic>('org.matrix.msc1767.audio')
|
||||||
?.tryGetList<int>('waveform');
|
?.tryGetList<int>('waveform');
|
||||||
@ -163,6 +163,14 @@ class _AudioPlayerState extends State<AudioPlayerWidget> {
|
|||||||
return eventWaveForm;
|
return eventWaveForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
late final List<int> waveform;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
waveform = _getWaveform();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final statusText = this.statusText ??= _durationString ?? '00:00';
|
final statusText = this.statusText ??= _durationString ?? '00:00';
|
||||||
|
@ -125,7 +125,6 @@ class _RecordingDialogState extends State<RecordingDialog> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Center(
|
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
@ -145,8 +144,11 @@ class _RecordingDialogState extends State<RecordingDialog> {
|
|||||||
.toList(),
|
.toList(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
SizedBox(
|
||||||
|
width: 48,
|
||||||
|
child: Text(time),
|
||||||
),
|
),
|
||||||
Text(time),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
if (PlatformInfos.isCupertinoStyle) {
|
if (PlatformInfos.isCupertinoStyle) {
|
||||||
|
Loading…
Reference in New Issue
Block a user