Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(gitlab): reviewer picker replaces the reviewer on single-reviewer hosts #30510

OpenTonybynMp4(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/30510/headopened View on GitHub

Showing 11 changed files with 51 additions and 9 deletions (loading 8).

x
0 of 11 viewed, 11 left
18 additions and 2 deletionsapps/mobile/src/features/pull-requests/PullRequestReviewersScreen.tsxModified
View file
@@ -19,6 +19,7 @@
isSelected,
changeBatches,
selectionChanges,
+ toggleOnlySelection,
toggleSelection,
} from "@t3tools/client-runtime/pull-request-selection";
import type { PullRequestReviewerCandidate } from "@t3tools/contracts";
@@ -161,6 +162,7 @@
const listCandidates = pr?.capabilities.reviewers.listCandidates === true;
// Loaded rows first: they carry the request state mutations update.
const latest = [...(result.data?.candidates ?? []), ...(searchResult.data?.candidates ?? [])];
+ const single = result.data?.multiple === false;
// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- picks are sent when the sheet leaves the navigation stack, however it is dismissed
useEffect(
() =>
@@ -235,7 +237,7 @@
ref={listRef}
data={candidates}
keyExtractor={(candidate) => `${candidate.kind}:${candidate.id}`}
- extraData={{ allowed, draft }}
+ extraData={{ allowed, draft, single }}
estimatedItemSize={64}
recycleItems
renderScrollComponent={NativeScrollView}
@@ -280,7 +282,21 @@
accessibilityState={{ disabled: !allowed }}