New Edit Profile dialog on web, use new Edit Image dialog everywhere (#8220)

This commit is contained in:
Samuel Newman
2025-05-06 22:50:28 +03:00
committed by GitHub
parent 3f7dc9a8e5
commit 4c8fd006f6
21 changed files with 532 additions and 441 deletions
+3 -7
View File
@@ -1,25 +1,21 @@
import {
type ImagePickerOptions,
launchImageLibraryAsync,
MediaTypeOptions,
} from 'expo-image-picker'
import {t} from '@lingui/macro'
import {type ImageMeta} from '#/state/gallery'
import * as Toast from '#/view/com/util/Toast'
import {getDataUriSize} from './util'
export type PickerImage = {
mime: string
height: number
width: number
path: string
export type PickerImage = ImageMeta & {
size: number
}
export async function openPicker(opts?: ImagePickerOptions) {
const response = await launchImageLibraryAsync({
exif: false,
mediaTypes: MediaTypeOptions.Images,
mediaTypes: ['images'],
quality: 1,
...opts,
legacy: true,