Draft previews (#9803)
* Send deviceId and platform
* Add deviceId and deviceName to drafts, skip loading media for other devies
* WIP new preview
* show rich text in drafts list
(cherry picked from commit fb70d53d59)
* New draft preview UI
* Tighten up spacing in draft list
* Add i18n comments
---------
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import * as Device from 'expo-device'
|
||||
|
||||
import * as env from '#/env'
|
||||
|
||||
export const FALLBACK_ANDROID = 'Android'
|
||||
export const FALLBACK_IOS = 'iOS'
|
||||
export const FALLBACK_WEB = 'Web'
|
||||
|
||||
export function getDeviceName(): string {
|
||||
const deviceName = Device.deviceName
|
||||
if (env.IS_ANDROID) {
|
||||
return deviceName || FALLBACK_ANDROID
|
||||
} else if (env.IS_IOS) {
|
||||
return deviceName || FALLBACK_IOS
|
||||
} else {
|
||||
return FALLBACK_WEB // could append browser info here
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user