[Drafts] Storage fixes (#9790)
* delete media from existsCache when deleting * revoke media URLs * skip revoking objecturls until the composer is completely closed * [Drafts] Metrics (#9794) * metrics for drafts * Nit: format * nit: use new util for clarity * nit: use new util for clarity --------- Co-authored-by: Eric Bailey <git@esb.lol> --------- Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
@@ -33,6 +33,14 @@ export type OnPostSuccessData =
|
||||
}
|
||||
| undefined
|
||||
|
||||
export type ComposerLogContext =
|
||||
| 'Fab'
|
||||
| 'PostReply'
|
||||
| 'QuotePost'
|
||||
| 'ProfileFeed'
|
||||
| 'Deeplink'
|
||||
| 'Other'
|
||||
|
||||
export interface ComposerOpts {
|
||||
replyTo?: ComposerOptsPostRef
|
||||
onPost?: (postUri: string | undefined) => void
|
||||
@@ -44,6 +52,7 @@ export interface ComposerOpts {
|
||||
imageUris?: {uri: string; width: number; height: number; altText?: string}[]
|
||||
videoUri?: {uri: string; width: number; height: number}
|
||||
openGallery?: boolean
|
||||
logContext?: ComposerLogContext
|
||||
}
|
||||
|
||||
type StateContext = ComposerOpts | undefined
|
||||
|
||||
@@ -61,7 +61,7 @@ export function useComposerKeyboardShortcut() {
|
||||
)
|
||||
return
|
||||
if (event.key === 'n' || event.key === 'N') {
|
||||
openComposer({})
|
||||
openComposer({logContext: 'Other'})
|
||||
}
|
||||
}
|
||||
document.addEventListener('keydown', handler)
|
||||
|
||||
Reference in New Issue
Block a user