mirror of
https://github.com/block/buzz.git
synced 2026-10-31 06:21:34 +00:00
## Summary - add mobile editing for display name, profile description, and profile photo - support image positioning, emoji backgrounds, and animated avatar capture with native iOS controls - refine settings navigation, profile motion, and the connection identity row ## Testing - `just mobile-check` - `just mobile-test` (1,685 tests) --------- Signed-off-by: kenny lopez <klopez4212@gmail.com> Signed-off-by: Kenny Lopez <klopez4212@gmail.com> Co-authored-by: Carl <3c4caeafb646d23867f1c4832e68211d77e2561946171625f75c3ce1a3f2670f@buzz.block.builderlab.xyz>
35 lines
1.1 KiB
Dart
35 lines
1.1 KiB
Dart
part of '../media_upload.dart';
|
|
|
|
/// Whether saving media needs Android's pre-scoped-storage runtime permission.
|
|
Future<bool> requiresLegacyMediaStoragePermission() async {
|
|
if (defaultTargetPlatform != TargetPlatform.android) {
|
|
return false;
|
|
}
|
|
return await _mediaUploadPlatformChannel.invokeMethod<bool>(
|
|
_requiresLegacyMediaStoragePermissionMethod,
|
|
) ??
|
|
false;
|
|
}
|
|
|
|
final mediaUploadServiceProvider = Provider<MediaUploadService>((ref) {
|
|
final config = ref.watch(relayConfigProvider);
|
|
final picker = ImagePicker();
|
|
final service = MediaUploadService(
|
|
baseUrl: config.baseUrl,
|
|
nsec: config.nsec,
|
|
pickGalleryImage: () => picker.pickImage(
|
|
source: ImageSource.gallery,
|
|
requestFullMetadata: false,
|
|
),
|
|
pickCameraImage: () => picker.pickImage(
|
|
source: ImageSource.camera,
|
|
requestFullMetadata: false,
|
|
),
|
|
pickGalleryImages: () => picker.pickMultiImage(requestFullMetadata: false),
|
|
pickGalleryVideo: () => picker.pickVideo(source: ImageSource.gallery),
|
|
pickAttachmentFile: file_selector.openFile,
|
|
);
|
|
ref.onDispose(service.dispose);
|
|
return service;
|
|
});
|