mirror of
https://github.com/block/buzz.git
synced 2026-11-01 23:11:58 +00:00
## Summary - make mobile unread state visible with bold channel names, an animated Inbox badge, and swipe-to-toggle Inbox rows - add directional transitions for top-level mobile navigation - let mobile send while media uploads, with cancellable progress UI - normalize iOS and Android video uploads, attach poster frames, and improve native video playback ## Validation - `just mobile-check` - `just mobile-test` - `cargo test -p buzz-media` - Pixel smoke test - iPhone smoke test Desktop background uploads moved to #4522 so the two platforms can be reviewed independently. --------- Signed-off-by: kenny lopez <klopez4212@gmail.com> Signed-off-by: Tom Brow <tomb@block.xyz> Co-authored-by: leader <71e9f2c44a6932b6772caaaccda1911d010463c3e2c6c40410b8329956046801@buzz.block.builderlab.xyz> Co-authored-by: Tom Brow <tomb@block.xyz>
39 lines
1.1 KiB
Dart
39 lines
1.1 KiB
Dart
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:buzz/features/channels/message_media.dart';
|
|
|
|
void main() {
|
|
group('classifyMediaUrl', () {
|
|
test('treats only mp4 URLs as video fallback', () {
|
|
expect(
|
|
classifyMediaUrl('https://example.com/media/clip.mp4'),
|
|
MessageMediaKind.video,
|
|
);
|
|
expect(classifyMediaUrl('https://example.com/media/clip.mov'), isNull);
|
|
expect(classifyMediaUrl('https://example.com/media/clip.webm'), isNull);
|
|
});
|
|
|
|
test('uses explicit video mimetypes for the video UI', () {
|
|
expect(
|
|
classifyMediaUrl(
|
|
'https://example.com/media/clip.mov',
|
|
imeta: const ImetaEntry(
|
|
url: 'https://example.com/media/clip.mov',
|
|
mimeType: 'video/quicktime',
|
|
),
|
|
),
|
|
MessageMediaKind.video,
|
|
);
|
|
expect(
|
|
classifyMediaUrl(
|
|
'https://example.com/media/clip.mp4',
|
|
imeta: const ImetaEntry(
|
|
url: 'https://example.com/media/clip.mp4',
|
|
mimeType: 'video/mp4',
|
|
),
|
|
),
|
|
MessageMediaKind.video,
|
|
);
|
|
});
|
|
});
|
|
}
|