mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 10:58:10 +00:00
fix(mobile): rebuild comment sends when the draft's item changes
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
useRef,
|
||||
useState
|
||||
} from './mobile-tasks-dependencies'
|
||||
import { githubTaskKey } from './github-task-identity'
|
||||
import { taskItemIdentity } from './task-draft-rows'
|
||||
import type { ActionableTaskItem } from './mobile-tasks-project-workspace-types'
|
||||
import type { DetailPayload } from './mobile-tasks-provider-detail-types'
|
||||
import { isRpcDeliveryUnknown } from '../transport/rpc/rpc-delivery-ambiguity'
|
||||
@@ -33,7 +33,7 @@ type CommentSendOutcome = {
|
||||
}
|
||||
|
||||
function itemIdentity(item: ActionableTaskItem | null): string | null {
|
||||
return item?.provider === 'github' ? githubTaskKey(item.source) : (item?.key ?? null)
|
||||
return item && taskItemIdentity(item)
|
||||
}
|
||||
|
||||
function sameCommentText(a: string, b: string): boolean {
|
||||
|
||||
@@ -160,7 +160,7 @@ export function useMobileTasksHostedCommentReviewActions<
|
||||
finish()
|
||||
}
|
||||
},
|
||||
[claimPublication, client, itemCommentDraft, tryBeginMutation]
|
||||
[claimPublication, client, itemCommentDraft, setItemCommentDraft, tryBeginMutation]
|
||||
)
|
||||
|
||||
const copyTaskLink = useCallback(
|
||||
|
||||
@@ -81,7 +81,7 @@ export function useMobileTasksLinearItemActions<
|
||||
finish()
|
||||
}
|
||||
},
|
||||
[client, linearCommentDraft, tryBeginMutation]
|
||||
[client, linearCommentDraft, setLinearCommentDraft, tryBeginMutation]
|
||||
)
|
||||
|
||||
const openLinearSubIssue = useCallback(
|
||||
|
||||
@@ -233,7 +233,7 @@ export function useMobileTasksProjectWorkspaceCommentActions(model: WorkspaceCre
|
||||
setProjectMutating(false)
|
||||
}
|
||||
},
|
||||
[activeGitHubProjectHost, client, projectCommentDraft, projectMutating]
|
||||
[activeGitHubProjectHost, client, projectCommentDraft, projectMutating, setProjectCommentDraft]
|
||||
)
|
||||
|
||||
const updateProjectRowComment = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user