Drop accidental eslint dependency (#11460)
This commit is contained in:
@@ -99,8 +99,7 @@ export async function getConfig() {
|
||||
return await getPublicAppviewClient().call(app.bsky.ageassurance.getConfig)
|
||||
}
|
||||
export function getConfigFromCache():
|
||||
| app.bsky.ageassurance.getConfig.$OutputBody
|
||||
| undefined {
|
||||
app.bsky.ageassurance.getConfig.$OutputBody | undefined {
|
||||
return qc.getQueryData<app.bsky.ageassurance.getConfig.$OutputBody>(
|
||||
configQueryKey,
|
||||
)
|
||||
|
||||
@@ -29,8 +29,7 @@ export const otherRequiredData: OtherRequiredData = {
|
||||
|
||||
const serverStateEnabled = false || IS_E2E
|
||||
export const serverState:
|
||||
| app.bsky.ageassurance.getState.$OutputBody
|
||||
| undefined = serverStateEnabled
|
||||
app.bsky.ageassurance.getState.$OutputBody | undefined = serverStateEnabled
|
||||
? {
|
||||
state: {
|
||||
lastInitiatedAt: undefined, // new Date(2025, 1, 1).toISOString(),
|
||||
|
||||
@@ -276,12 +276,7 @@ export type Events = {
|
||||
}
|
||||
'composer:open': {
|
||||
logContext:
|
||||
| 'Fab'
|
||||
| 'PostReply'
|
||||
| 'QuotePost'
|
||||
| 'ProfileFeed'
|
||||
| 'Deeplink'
|
||||
| 'Other'
|
||||
'Fab' | 'PostReply' | 'QuotePost' | 'ProfileFeed' | 'Deeplink' | 'Other'
|
||||
isReply: boolean
|
||||
hasQuote: boolean
|
||||
hasDraft: boolean
|
||||
@@ -596,10 +591,7 @@ export type Events = {
|
||||
}
|
||||
'chat:create': {
|
||||
logContext:
|
||||
| 'ProfileHeader'
|
||||
| 'NewChatDialog'
|
||||
| 'SendViaChatDialog'
|
||||
| 'ConvoSettings'
|
||||
'ProfileHeader' | 'NewChatDialog' | 'SendViaChatDialog' | 'ConvoSettings'
|
||||
}
|
||||
'chat:open': {
|
||||
logContext:
|
||||
@@ -1340,10 +1332,7 @@ export type Events = {
|
||||
// invite friends dialog opened, with the surface that triggered it
|
||||
'invite:dialog:open': {
|
||||
logContext:
|
||||
| 'ProfileHeader'
|
||||
| 'Drawer'
|
||||
| 'FindContactsSettings'
|
||||
| 'NuxAnnouncement'
|
||||
'ProfileHeader' | 'Drawer' | 'FindContactsSettings' | 'NuxAnnouncement'
|
||||
}
|
||||
// user copied the invite link to clipboard
|
||||
'invite:action:copy': {}
|
||||
|
||||
@@ -31,10 +31,7 @@ export type AutocompleteSearch = {
|
||||
}
|
||||
|
||||
export type AutocompleteItem =
|
||||
| AutocompleteProfile
|
||||
| AutocompleteTag
|
||||
| AutocompleteEmoji
|
||||
| AutocompleteSearch
|
||||
AutocompleteProfile | AutocompleteTag | AutocompleteEmoji | AutocompleteSearch
|
||||
|
||||
export type AutocompleteItemType = AutocompleteItem['type']
|
||||
|
||||
|
||||
@@ -86,8 +86,7 @@ export type ButtonState = {
|
||||
export type ButtonContext = VariantProps & ButtonState
|
||||
|
||||
type NonTextElements =
|
||||
| React.ReactElement
|
||||
| Iterable<React.ReactElement | null | undefined | boolean>
|
||||
React.ReactElement | Iterable<React.ReactElement | null | undefined | boolean>
|
||||
|
||||
export type ButtonProps = Pick<
|
||||
PressableProps,
|
||||
|
||||
@@ -13,8 +13,7 @@ export function useManageEmail2FA() {
|
||||
enabled,
|
||||
token,
|
||||
}:
|
||||
| {enabled: true; token?: undefined}
|
||||
| {enabled: false; token: string}) => {
|
||||
{enabled: true; token?: undefined} | {enabled: false; token: string}) => {
|
||||
if (!currentAccount?.email) {
|
||||
throw new Error('No email found for the current account')
|
||||
}
|
||||
|
||||
@@ -66,11 +66,7 @@ type ErrorItem = {
|
||||
}
|
||||
|
||||
type Item =
|
||||
| ProfileItem
|
||||
| ExistingChatItem
|
||||
| EmptyItem
|
||||
| PlaceholderItem
|
||||
| ErrorItem
|
||||
ProfileItem | ExistingChatItem | EmptyItem | PlaceholderItem | ErrorItem
|
||||
|
||||
export function SearchablePeopleList({
|
||||
title,
|
||||
|
||||
@@ -11,9 +11,7 @@ import * as bsky from '#/types/bsky'
|
||||
* record (post/feed/list/etc.) so the caller can render a translated label.
|
||||
*/
|
||||
type ReplyEmbedSummary =
|
||||
| {type: 'external'; uri: string}
|
||||
| {type: 'post'}
|
||||
| {type: 'unknown'}
|
||||
{type: 'external'; uri: string} | {type: 'post'} | {type: 'unknown'}
|
||||
|
||||
function summarizeReplyEmbed(
|
||||
embed: chat.bsky.convo.defs.MessageView['embed'],
|
||||
|
||||
@@ -62,9 +62,7 @@ export function resolveAllowGroupInvites(
|
||||
chat: {allowIncoming?: string; allowGroupInvites?: string} | undefined,
|
||||
): 'all' | 'none' | 'following' {
|
||||
return (chat?.allowGroupInvites ?? chat?.allowIncoming ?? 'following') as
|
||||
| 'all'
|
||||
| 'none'
|
||||
| 'following'
|
||||
'all' | 'none' | 'following'
|
||||
}
|
||||
|
||||
export function localDateString(date: Date) {
|
||||
|
||||
Vendored
+2
-9
@@ -14,11 +14,7 @@ export const RELEASE_VERSION: string =
|
||||
* The env the app is running in e.g. development, testflight, production, e2e
|
||||
*/
|
||||
export const ENV: string = process.env.EXPO_PUBLIC_ENV as
|
||||
| 'production'
|
||||
| 'testflight'
|
||||
| 'development'
|
||||
| 'e2e'
|
||||
| (string & {})
|
||||
'production' | 'testflight' | 'development' | 'e2e' | (string & {})
|
||||
|
||||
/**
|
||||
* Indicates whether the app is running in TestFlight
|
||||
@@ -62,10 +58,7 @@ export const BUNDLE_DATE: number =
|
||||
* The log level for the app.
|
||||
*/
|
||||
export const LOG_LEVEL = (process.env.EXPO_PUBLIC_LOG_LEVEL || 'info') as
|
||||
| 'debug'
|
||||
| 'info'
|
||||
| 'warn'
|
||||
| 'error'
|
||||
'debug' | 'info' | 'warn' | 'error'
|
||||
|
||||
/**
|
||||
* Enable debug logs for specific logger instances
|
||||
|
||||
@@ -6,12 +6,7 @@
|
||||
* follows handleColor.
|
||||
*/
|
||||
export type InviteThemeKey =
|
||||
| 'dawn'
|
||||
| 'sunlight'
|
||||
| 'day'
|
||||
| 'dusk'
|
||||
| 'twilight'
|
||||
| 'night'
|
||||
'dawn' | 'sunlight' | 'day' | 'dusk' | 'twilight' | 'night'
|
||||
|
||||
export type InviteThemeVariant = {
|
||||
/** QR data + eye color */
|
||||
|
||||
@@ -21,7 +21,4 @@ export type LiveEventsWorkerResponse = {
|
||||
}
|
||||
|
||||
export type LiveEventFeedMetricContext =
|
||||
| 'explore'
|
||||
| 'discover'
|
||||
| 'sidebar'
|
||||
| 'settings'
|
||||
'explore' | 'discover' | 'sidebar' | 'settings'
|
||||
|
||||
@@ -8,11 +8,7 @@ import {darkTheme, defaultTheme, dimTheme} from './themes'
|
||||
export type ColorScheme = 'light' | 'dark'
|
||||
|
||||
export type PaletteColorName =
|
||||
| 'default'
|
||||
| 'primary'
|
||||
| 'secondary'
|
||||
| 'inverted'
|
||||
| 'error'
|
||||
'default' | 'primary' | 'secondary' | 'inverted' | 'error'
|
||||
export type PaletteColor = {
|
||||
background: string
|
||||
backgroundLight: string
|
||||
|
||||
@@ -60,8 +60,7 @@ function getRunningChannel(
|
||||
* entirely from embedded manifests, so narrow it ourselves.
|
||||
*/
|
||||
const manifest = currentlyRunning?.manifest as
|
||||
| {metadata?: {channel?: unknown}}
|
||||
| undefined
|
||||
{metadata?: {channel?: unknown}} | undefined
|
||||
const channel = manifest?.metadata?.channel
|
||||
if (typeof channel === 'string' && channel) {
|
||||
return channel
|
||||
|
||||
@@ -44,12 +44,7 @@ export type StartUploadResponse = {
|
||||
}
|
||||
|
||||
export type UploadState =
|
||||
| 'created'
|
||||
| 'finishing'
|
||||
| 'completed'
|
||||
| 'failed'
|
||||
| 'aborted'
|
||||
| 'expired'
|
||||
'created' | 'finishing' | 'completed' | 'failed' | 'aborted' | 'expired'
|
||||
|
||||
export type UploadStatusResponse = {
|
||||
jobId: string
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
// on the `video:upload:compressSkipped` analytics event, so the two stay in
|
||||
// sync.
|
||||
export type VideoCompressSkipReason =
|
||||
| 'gif'
|
||||
| 'below-byte-threshold'
|
||||
| 'no-webcodecs'
|
||||
| 'compress-error-fallback'
|
||||
'gif' | 'below-byte-threshold' | 'no-webcodecs' | 'compress-error-fallback'
|
||||
|
||||
export type VideoUploadTransport = 'multipart' | 'legacy' | 'legacy-fallback'
|
||||
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import {type Events} from '#/analytics/metrics/types'
|
||||
|
||||
export type SharedNavTab =
|
||||
| 'Home'
|
||||
| 'Search'
|
||||
| 'Messages'
|
||||
| 'Notifications'
|
||||
| 'MyProfile'
|
||||
'Home' | 'Search' | 'Messages' | 'Notifications' | 'MyProfile'
|
||||
|
||||
export const TAB_TO_NAV_ITEM: Record<
|
||||
SharedNavTab,
|
||||
|
||||
@@ -169,8 +169,7 @@ export type AllNavigatorParams = CommonNavigatorParams & {
|
||||
export type NavigationProp = NativeStackNavigationProp<AllNavigatorParams>
|
||||
|
||||
export type State =
|
||||
| NavigationState
|
||||
| Omit<PartialState<NavigationState>, 'stale'>
|
||||
NavigationState | Omit<PartialState<NavigationState>, 'stale'>
|
||||
|
||||
export type RouteParams = Record<string, string>
|
||||
export type MatchResult = {params: RouteParams}
|
||||
|
||||
@@ -238,14 +238,12 @@ function GroupSettings({
|
||||
: []),
|
||||
]
|
||||
items.push(
|
||||
...groupMembers.map(
|
||||
(profile): Item => ({
|
||||
type: 'CHAT_MEMBER',
|
||||
key: profile.did,
|
||||
profile,
|
||||
status: primaryMember?.did === profile.did ? 'owner' : 'standard',
|
||||
}),
|
||||
),
|
||||
...groupMembers.map((profile): Item => ({
|
||||
type: 'CHAT_MEMBER',
|
||||
key: profile.did,
|
||||
profile,
|
||||
status: primaryMember?.did === profile.did ? 'owner' : 'standard',
|
||||
})),
|
||||
)
|
||||
const placeholderCount = Math.max(
|
||||
0,
|
||||
|
||||
@@ -40,8 +40,7 @@ import * as bsky from '#/types/bsky'
|
||||
* embed: either a quoted post or a group chat invite link.
|
||||
*/
|
||||
export type MessageEmbedState =
|
||||
| {type: 'post'; uri: string}
|
||||
| {type: 'invite'; code: string}
|
||||
{type: 'post'; uri: string} | {type: 'invite'; code: string}
|
||||
|
||||
export function useMessageEmbed() {
|
||||
const route =
|
||||
|
||||
@@ -16,9 +16,7 @@ export type SystemMessageDateDividerItem = {
|
||||
}
|
||||
|
||||
export type RenderItem =
|
||||
| ConvoItem
|
||||
| SystemMessageGroupItem
|
||||
| SystemMessageDateDividerItem
|
||||
ConvoItem | SystemMessageGroupItem | SystemMessageDateDividerItem
|
||||
|
||||
function getSentAt(item: ConvoItem): string | null {
|
||||
if (
|
||||
|
||||
@@ -38,9 +38,9 @@ export function GermButton({
|
||||
const linkWarningControl = Dialog.useDialogControl()
|
||||
|
||||
// exclude `none` and all unknown values
|
||||
if (
|
||||
!(germ.showButtonTo === 'everyone' || germ.showButtonTo === 'usersIFollow')
|
||||
) {
|
||||
if (!(
|
||||
germ.showButtonTo === 'everyone' || germ.showButtonTo === 'usersIFollow'
|
||||
)) {
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
@@ -31,11 +31,7 @@ type SubmitTask = {
|
||||
}
|
||||
|
||||
type ErrorField =
|
||||
| 'invite-code'
|
||||
| 'email'
|
||||
| 'handle'
|
||||
| 'password'
|
||||
| 'date-of-birth'
|
||||
'invite-code' | 'email' | 'handle' | 'password' | 'date-of-birth'
|
||||
|
||||
export type SignupState = {
|
||||
analytics?: AnalyticsContextType
|
||||
|
||||
Vendored
+1
-3
@@ -25,9 +25,7 @@ export interface PostShadow {
|
||||
repostUri: AtUriString | 'pending' | undefined
|
||||
isDeleted: boolean
|
||||
embed:
|
||||
| app.bsky.embed.record.View
|
||||
| app.bsky.embed.recordWithMedia.View
|
||||
| undefined
|
||||
app.bsky.embed.record.View | app.bsky.embed.recordWithMedia.View | undefined
|
||||
pinned: boolean
|
||||
optimisticReplyCount: number | undefined
|
||||
bookmarked: boolean | undefined
|
||||
|
||||
Vendored
+1
-2
@@ -47,8 +47,7 @@ export interface ProfileShadow {
|
||||
verification: app.bsky.actor.defs.VerificationState
|
||||
status: app.bsky.actor.defs.StatusView | undefined
|
||||
activitySubscription:
|
||||
| app.bsky.notification.defs.ActivitySubscription
|
||||
| undefined
|
||||
app.bsky.notification.defs.ActivitySubscription | undefined
|
||||
}
|
||||
|
||||
const shadows: WeakMap<
|
||||
|
||||
@@ -52,8 +52,7 @@ type ComposerImageWithTransformation = ComposerImageBase & {
|
||||
}
|
||||
|
||||
export type ComposerImage =
|
||||
| ComposerImageWithoutTransformation
|
||||
| ComposerImageWithTransformation
|
||||
ComposerImageWithoutTransformation | ComposerImageWithTransformation
|
||||
|
||||
let _imageCacheDirectory: string
|
||||
|
||||
|
||||
@@ -709,8 +709,7 @@ export class Convo {
|
||||
}
|
||||
|
||||
private pendingFetchConvo:
|
||||
| Promise<{convo: chat.bsky.convo.defs.ConvoView}>
|
||||
| undefined
|
||||
Promise<{convo: chat.bsky.convo.defs.ConvoView}> | undefined
|
||||
async fetchConvo() {
|
||||
if (this.pendingFetchConvo) return this.pendingFetchConvo
|
||||
|
||||
|
||||
@@ -153,8 +153,7 @@ export function ConvoProvider({
|
||||
const queryKey = event.query.queryKey as string[]
|
||||
if (queryKey[0] === root && queryKey[1] === id) {
|
||||
const data = event.query.state.data as
|
||||
| chat.bsky.convo.defs.ConvoView
|
||||
| undefined
|
||||
chat.bsky.convo.defs.ConvoView | undefined
|
||||
if (data && convo.convo && data.muted !== convo.convo.view.muted) {
|
||||
convo.updateMuted(data.muted)
|
||||
}
|
||||
|
||||
@@ -142,8 +142,7 @@ export function invalidateJoinLinkPreviewsForConvo(
|
||||
const [root] = query.queryKey
|
||||
if (root !== joinLinkPreviewQueryKeyRoot) return false
|
||||
const data = query.state.data as
|
||||
| chat.bsky.group.getJoinLinkPreviews.$OutputBody
|
||||
| undefined
|
||||
chat.bsky.group.getJoinLinkPreviews.$OutputBody | undefined
|
||||
return (
|
||||
data?.joinLinkPreviews.some(
|
||||
preview =>
|
||||
|
||||
@@ -38,10 +38,7 @@ export const RQKEY = (
|
||||
readState: 'all' | 'unread' = 'all',
|
||||
kind: 'all' | 'group' | 'direct' = 'all',
|
||||
lockStatus:
|
||||
| 'unlocked'
|
||||
| 'locked'
|
||||
| 'locked-permanently'
|
||||
| undefined = undefined,
|
||||
'unlocked' | 'locked' | 'locked-permanently' | undefined = undefined,
|
||||
limit?: number,
|
||||
) => [RQKEY_ROOT, status, readState, kind, lockStatus, limit] as const
|
||||
|
||||
@@ -255,9 +252,9 @@ export function ListConvosProviderInner({
|
||||
// memberCount bump to avoid double-counting.
|
||||
const alreadyKnownMember =
|
||||
queryClient
|
||||
.getQueryData<
|
||||
chat.bsky.actor.defs.ProfileViewBasic[]
|
||||
>(listConvoMembersQueryKey(convoId))
|
||||
.getQueryData<chat.bsky.actor.defs.ProfileViewBasic[]>(
|
||||
listConvoMembersQueryKey(convoId),
|
||||
)
|
||||
?.some(m => m.did === did) ?? false
|
||||
mutateMembers(convoId, list =>
|
||||
list.some(m => m.did === did) ? list : list.concat(newMember),
|
||||
@@ -279,9 +276,9 @@ export function ListConvosProviderInner({
|
||||
// list, skip the memberCount decrement to avoid double-counting.
|
||||
const alreadyRemovedMember =
|
||||
queryClient
|
||||
.getQueryData<
|
||||
chat.bsky.actor.defs.ProfileViewBasic[]
|
||||
>(listConvoMembersQueryKey(convoId))
|
||||
.getQueryData<chat.bsky.actor.defs.ProfileViewBasic[]>(
|
||||
listConvoMembersQueryKey(convoId),
|
||||
)
|
||||
?.some(m => m.did === did) === false
|
||||
mutateMembers(convoId, list => list.filter(m => m.did !== did))
|
||||
mutateConvoView(
|
||||
|
||||
@@ -6,10 +6,7 @@ import {useAppviewClient, useSession} from '#/state/session'
|
||||
import {app} from '#/lexicons'
|
||||
|
||||
export type MyListsFilter =
|
||||
| 'all'
|
||||
| 'curate'
|
||||
| 'mod'
|
||||
| 'all-including-subscribed'
|
||||
'all' | 'curate' | 'mod' | 'all-including-subscribed'
|
||||
|
||||
const RQKEY_ROOT = 'my-lists'
|
||||
export const RQKEY = (filter: MyListsFilter) => [RQKEY_ROOT, filter]
|
||||
|
||||
@@ -3,8 +3,7 @@ import {type app} from '#/lexicons'
|
||||
export type Notification = app.bsky.notification.listNotifications.Notification
|
||||
|
||||
export type NotificationType =
|
||||
| StarterPackNotificationType
|
||||
| OtherNotificationType
|
||||
StarterPackNotificationType | OtherNotificationType
|
||||
|
||||
export type FeedNotification =
|
||||
| (FeedNotificationBase & {
|
||||
@@ -56,6 +55,5 @@ type FeedNotificationBase = {
|
||||
additional?: Notification[]
|
||||
subjectUri?: string
|
||||
subject?:
|
||||
| app.bsky.feed.defs.PostView
|
||||
| app.bsky.graph.defs.StarterPackViewBasic
|
||||
app.bsky.feed.defs.PostView | app.bsky.graph.defs.StarterPackViewBasic
|
||||
}
|
||||
|
||||
@@ -89,9 +89,7 @@ export function createMaybeDetachedQuoteEmbed({
|
||||
quoteUri: AtUriString
|
||||
detached: true
|
||||
}):
|
||||
| app.bsky.embed.record.View
|
||||
| app.bsky.embed.recordWithMedia.View
|
||||
| undefined {
|
||||
app.bsky.embed.record.View | app.bsky.embed.recordWithMedia.View | undefined {
|
||||
if (bsky.isType(app.bsky.embed.record.view, post.embed)) {
|
||||
if (detached) {
|
||||
return createEmbedViewDetachedRecord({uri: quoteUri})
|
||||
|
||||
@@ -16,11 +16,6 @@ export type UsePreferencesQueryResponse = Omit<
|
||||
|
||||
export type ThreadViewPreferences = {
|
||||
sort:
|
||||
| 'hotness'
|
||||
| 'oldest'
|
||||
| 'newest'
|
||||
| 'most-likes'
|
||||
| 'random'
|
||||
| (string & {})
|
||||
'hotness' | 'oldest' | 'newest' | 'most-likes' | 'random' | (string & {})
|
||||
lab_treeViewEnabled?: boolean
|
||||
}
|
||||
|
||||
@@ -206,12 +206,13 @@ function mergeList(a?: string[], b?: string[]): string[] | undefined {
|
||||
* than re-validated here. `q`, `limit`, `cursor` and `sort` are the caller's.
|
||||
*/
|
||||
type SearchPostsV2FilterParams = {
|
||||
[K in Exclude<
|
||||
keyof app.bsky.feed.searchPostsV2.$Params,
|
||||
'query' | 'limit' | 'cursor' | 'sort'
|
||||
>]?: app.bsky.feed.searchPostsV2.$Params[K] extends
|
||||
| readonly (infer _E)[]
|
||||
| undefined
|
||||
[
|
||||
K in Exclude<
|
||||
keyof app.bsky.feed.searchPostsV2.$Params,
|
||||
'query' | 'limit' | 'cursor' | 'sort'
|
||||
>
|
||||
]?: app.bsky.feed.searchPostsV2.$Params[K] extends
|
||||
readonly (infer _E)[] | undefined
|
||||
? string[]
|
||||
: app.bsky.feed.searchPostsV2.$Params[K] extends string | undefined
|
||||
? string
|
||||
|
||||
@@ -167,8 +167,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
sessionEvent === 'update' &&
|
||||
sessionData &&
|
||||
(store.getState().currentBundleState.bundle as unknown as
|
||||
| SessionBundle
|
||||
| PublicSessionBundle) === bundle
|
||||
SessionBundle | PublicSessionBundle) === bundle
|
||||
) {
|
||||
failedExpiryTokensRef.current.get(accountDid)?.clear()
|
||||
}
|
||||
@@ -200,8 +199,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
if (sessionEvent === 'expired') {
|
||||
const current = store.getState()
|
||||
const currentBundle = current.currentBundleState.bundle as unknown as
|
||||
| SessionBundle
|
||||
| PublicSessionBundle
|
||||
SessionBundle | PublicSessionBundle
|
||||
const dyingRefreshJwt = sessionData?.refreshJwt
|
||||
// Stale bundle events are handled by the reducer's identity guard.
|
||||
if (
|
||||
@@ -509,8 +507,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
SessionApiContext['refreshSession']
|
||||
>(async () => {
|
||||
const bundle = store.getState().currentBundleState.bundle as unknown as
|
||||
| SessionBundle
|
||||
| PublicSessionBundle
|
||||
SessionBundle | PublicSessionBundle
|
||||
if (!bundle.session) return undefined // logged out: nothing to refresh
|
||||
const before = bundle.session.session
|
||||
const after = await bundle.session.refresh()
|
||||
@@ -595,8 +592,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
* the leader already refreshed, then dispose the previous bundle.
|
||||
*/
|
||||
const prevBundle = state.currentBundleState.bundle as unknown as
|
||||
| SessionBundle
|
||||
| PublicSessionBundle
|
||||
SessionBundle | PublicSessionBundle
|
||||
// Avoid replacing the live bundle for an unrelated account update.
|
||||
const live =
|
||||
prevBundle.session && !prevBundle.session.destroyed
|
||||
@@ -685,8 +681,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
)
|
||||
|
||||
const bundle = state.currentBundleState.bundle as unknown as
|
||||
| SessionBundle
|
||||
| PublicSessionBundle
|
||||
SessionBundle | PublicSessionBundle
|
||||
|
||||
// @ts-expect-error window type is not declared, debug only
|
||||
// eslint-disable-next-line react-hooks/immutability
|
||||
|
||||
@@ -139,21 +139,13 @@ type Log =
|
||||
| {
|
||||
type: 'method:start'
|
||||
method:
|
||||
| 'createAccount'
|
||||
| 'login'
|
||||
| 'logout'
|
||||
| 'resumeSession'
|
||||
| 'removeAccount'
|
||||
'createAccount' | 'login' | 'logout' | 'resumeSession' | 'removeAccount'
|
||||
account?: RedactedAccount
|
||||
}
|
||||
| {
|
||||
type: 'method:end'
|
||||
method:
|
||||
| 'createAccount'
|
||||
| 'login'
|
||||
| 'logout'
|
||||
| 'resumeSession'
|
||||
| 'removeAccount'
|
||||
'createAccount' | 'login' | 'logout' | 'resumeSession' | 'removeAccount'
|
||||
account?: RedactedAccount
|
||||
}
|
||||
| {
|
||||
|
||||
@@ -33,12 +33,7 @@ export type OnPostSuccessData =
|
||||
| undefined
|
||||
|
||||
export type ComposerLogContext =
|
||||
| 'Fab'
|
||||
| 'PostReply'
|
||||
| 'QuotePost'
|
||||
| 'ProfileFeed'
|
||||
| 'Deeplink'
|
||||
| 'Other'
|
||||
'Fab' | 'PostReply' | 'QuotePost' | 'ProfileFeed' | 'Deeplink' | 'Other'
|
||||
|
||||
export interface ComposerOpts {
|
||||
replyTo?: ComposerOptsPostRef
|
||||
|
||||
@@ -27,11 +27,7 @@ type Controls = {
|
||||
* The did of the account to populate the login form with.
|
||||
*/
|
||||
requestedAccount?:
|
||||
| (string & {})
|
||||
| 'none'
|
||||
| 'new'
|
||||
| 'starterpack'
|
||||
| 'groupchat'
|
||||
(string & {}) | 'none' | 'new' | 'starterpack' | 'groupchat'
|
||||
}) => void
|
||||
/**
|
||||
* Clears the requested account so that next time the logged out view is
|
||||
|
||||
@@ -40,9 +40,7 @@ export interface Follow10ProgressGuide extends BaseProgressGuide {
|
||||
}
|
||||
|
||||
export type ProgressGuide =
|
||||
| Like10AndFollow7ProgressGuide
|
||||
| Follow10ProgressGuide
|
||||
| undefined
|
||||
Like10AndFollow7ProgressGuide | Follow10ProgressGuide | undefined
|
||||
|
||||
const ProgressGuideContext = createContext<ProgressGuide>(undefined)
|
||||
ProgressGuideContext.displayName = 'ProgressGuideContext'
|
||||
|
||||
@@ -29,5 +29,4 @@ export function isView(v: unknown): v is app.bsky.graph.defs.StarterPackView {
|
||||
* Matches any starter pack view exported by our SDK.
|
||||
*/
|
||||
export type AnyStarterPackView =
|
||||
| app.bsky.graph.defs.StarterPackViewBasic
|
||||
| app.bsky.graph.defs.StarterPackView
|
||||
app.bsky.graph.defs.StarterPackViewBasic | app.bsky.graph.defs.StarterPackView
|
||||
|
||||
@@ -157,8 +157,7 @@ export type ComposerAction =
|
||||
| {
|
||||
type: 'clear'
|
||||
initInteractionSettings:
|
||||
| app.bsky.actor.defs.PostInteractionSettingsPref
|
||||
| undefined
|
||||
app.bsky.actor.defs.PostInteractionSettingsPref | undefined
|
||||
}
|
||||
| {
|
||||
type: 'mark_saved'
|
||||
@@ -632,8 +631,7 @@ export function createComposerState({
|
||||
initImageUris: ComposerOpts['imageUris']
|
||||
initQuoteUri: string | undefined
|
||||
initInteractionSettings:
|
||||
| app.bsky.actor.defs.PostInteractionSettingsPref
|
||||
| undefined
|
||||
app.bsky.actor.defs.PostInteractionSettingsPref | undefined
|
||||
}): ComposerState {
|
||||
let media: ImagesMedia | GalleryMedia | undefined
|
||||
if (initImageUris?.length) {
|
||||
|
||||
@@ -148,11 +148,7 @@ type DoneState = {
|
||||
}
|
||||
|
||||
export type VideoState =
|
||||
| ErrorState
|
||||
| CompressingState
|
||||
| UploadingState
|
||||
| ProcessingState
|
||||
| DoneState
|
||||
ErrorState | CompressingState | UploadingState | ProcessingState | DoneState
|
||||
|
||||
export function createVideoState(
|
||||
asset: ImagePickerAsset,
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import {type VideoCompressSkipReason} from '#/lib/media/video/types'
|
||||
|
||||
export type VideoProgressPhase =
|
||||
| 'compressing'
|
||||
| 'uploading'
|
||||
| 'uploadingWithoutCompression'
|
||||
| 'processing'
|
||||
'compressing' | 'uploading' | 'uploadingWithoutCompression' | 'processing'
|
||||
|
||||
// Keep progress monotonic across the full client pipeline instead of showing
|
||||
// three separate 0 -> 100 cycles. Backend processing progress covers the
|
||||
|
||||
@@ -8,8 +8,7 @@ export type TextInputRef = {
|
||||
* @platform web
|
||||
*/
|
||||
getCursorPosition: () =>
|
||||
| {left: number; right: number; top: number; bottom: number}
|
||||
| undefined
|
||||
{left: number; right: number; top: number; bottom: number} | undefined
|
||||
/**
|
||||
* Closes the autocomplete popup if it is open.
|
||||
* Returns `true` if the popup was closed, `false` otherwise.
|
||||
|
||||
@@ -37,8 +37,7 @@ import {PressableWithHover} from './PressableWithHover'
|
||||
import {Text} from './text/Text'
|
||||
|
||||
type Event =
|
||||
| React.MouseEvent<HTMLAnchorElement, MouseEvent>
|
||||
| GestureResponderEvent
|
||||
React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent
|
||||
|
||||
interface Props extends React.ComponentProps<typeof TouchableOpacity> {
|
||||
testID?: string
|
||||
|
||||
@@ -521,9 +521,7 @@ let Row = function RowImpl<ItemT>({
|
||||
item: ItemT
|
||||
index: number
|
||||
renderItem:
|
||||
| null
|
||||
| undefined
|
||||
| ((info: ListRenderItemInfo<ItemT>) => React.ReactNode)
|
||||
null | undefined | ((info: ListRenderItemInfo<ItemT>) => React.ReactNode)
|
||||
extraData: unknown
|
||||
onItemSeen: ((item: ItemT) => void) | undefined
|
||||
registerRowNode: (index: number, node: HTMLElement | null) => void
|
||||
@@ -604,9 +602,7 @@ Row = memo(Row) as <ItemT>(props: {
|
||||
item: ItemT
|
||||
index: number
|
||||
renderItem:
|
||||
| null
|
||||
| undefined
|
||||
| ((info: ListRenderItemInfo<ItemT>) => React.ReactNode)
|
||||
null | undefined | ((info: ListRenderItemInfo<ItemT>) => React.ReactNode)
|
||||
extraData: unknown
|
||||
onItemSeen: ((item: ItemT) => void) | undefined
|
||||
registerRowNode: (index: number, node: HTMLElement | null) => void
|
||||
|
||||
@@ -307,7 +307,7 @@ let UserAvatar = ({
|
||||
}, [size, style])
|
||||
|
||||
return avatar &&
|
||||
!((moderation?.blur && IS_ANDROID) /* android crashes with blur */) ? (
|
||||
!(moderation?.blur && IS_ANDROID /* android crashes with blur */) ? (
|
||||
<View style={containerStyle}>
|
||||
{usePlainRNImage ? (
|
||||
<RNImage
|
||||
|
||||
@@ -212,7 +212,7 @@ export function UserBanner({
|
||||
/>
|
||||
</>
|
||||
) : banner &&
|
||||
!((moderation?.blur && IS_ANDROID) /* android crashes with blur */) ? (
|
||||
!(moderation?.blur && IS_ANDROID /* android crashes with blur */) ? (
|
||||
<Image
|
||||
style={[styles.bannerImage, t.atoms.bg_contrast_25]}
|
||||
contentFit="cover"
|
||||
|
||||
Reference in New Issue
Block a user