@cometchat/chat-uikit-react-native 5.3.10 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/.gradle/7.4/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.4/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/src/main/java/com/reactnativecometchatuikit/CometChatClipboardModule.kt +52 -0
- package/android/src/main/java/com/reactnativecometchatuikit/CometchatUiKitPackage.java +1 -0
- package/android/src/main/java/com/reactnativecometchatuikit/FileManager.java +95 -8
- package/android/src/main/java/com/reactnativecometchatuikit/RichTextEditorView.kt +237 -6
- package/android/src/main/java/com/reactnativecometchatuikit/RichTextEditorViewManager.kt +2 -1
- package/android/src/main/java/com/reactnativecometchatuikit/SoundPlayer.java +85 -47
- package/ios/CometChatClipboardModule.m +11 -0
- package/ios/CometChatClipboardModule.swift +41 -0
- package/ios/FileManager.m +201 -39
- package/ios/RichTextEditorView.swift +312 -4
- package/ios/RichTextEditorViewManager.m +1 -0
- package/ios/SoundPlayer.m +18 -6
- package/package.json +9 -7
- package/react-native-cometchat-ui-kit.podspec +1 -0
- package/src/CometChatCompactMessageComposer/CometChatCompactMessageComposer.tsx +692 -107
- package/src/CometChatConversations/CometChatConversations.tsx +19 -6
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +649 -49
- package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +23 -4
- package/src/CometChatMessageList/CometChatMessageList.tsx +463 -54
- package/src/CometChatMessageList/MANUAL_TEST_CASES.md +154 -0
- package/src/CometChatMessageList/components/MessageListItem.tsx +30 -17
- package/src/CometChatMessageList/style.ts +33 -5
- package/src/CometChatRichTextEditor/RichTextEditorViewNativeComponent.ts +13 -0
- package/src/CometChatRichTextEditor/index.tsx +25 -0
- package/src/CometChatSearch/CometChatSearch.tsx +296 -154
- package/src/calls/CallingExtension.tsx +19 -13
- package/src/extensions/LinkPreview/LinkPreviewBubble.tsx +20 -1
- package/src/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.tsx +20 -9
- package/src/index.ts +39 -0
- package/src/shared/CometChatUiKit/CometChatUIKit.ts +40 -34
- package/src/shared/base/Types.ts +3 -0
- package/src/shared/constants/UIKitConstants.ts +15 -1
- package/src/shared/framework/DataSource.ts +14 -4
- package/src/shared/framework/DataSourceDecorator.tsx +17 -8
- package/src/shared/framework/MessageDataSource.tsx +307 -60
- package/src/shared/helper/useToast.tsx +29 -0
- package/src/shared/icons/components/audio-file-type.tsx +11 -22
- package/src/shared/icons/components/document-file-type.tsx +11 -24
- package/src/shared/icons/components/image-file-type.tsx +12 -21
- package/src/shared/icons/components/link-file-type.tsx +25 -0
- package/src/shared/icons/components/pdf-file-type.tsx +11 -22
- package/src/shared/icons/components/presentation-file-type.tsx +11 -24
- package/src/shared/icons/components/spreadsheet-file-type.tsx +11 -24
- package/src/shared/icons/components/text-file-type.tsx +11 -21
- package/src/shared/icons/components/unknown-file-type.tsx +21 -25
- package/src/shared/icons/components/video-file-type.tsx +11 -24
- package/src/shared/icons/components/zip-file-type.tsx +11 -24
- package/src/shared/icons/icon-mapping.tsx +2 -0
- package/src/shared/index.ts +28 -0
- package/src/shared/modals/AttachmentPickerConfiguration.ts +13 -0
- package/src/shared/modals/SelectedAttachment.ts +65 -0
- package/src/shared/modals/UploadState.ts +10 -0
- package/src/shared/modals/index.ts +4 -0
- package/src/shared/resources/CometChatLocalizeNew/resources/de/translation.json +42 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/en/translation.json +42 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/es/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/fr/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/hi/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/hu/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/it/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/ja/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/ko/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/lt/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/ms/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/nl/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/pt/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/ru/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/sv/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/tr/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/zh/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/zh-tw/translation.json +43 -2
- package/src/shared/services/UploadQueueService.ts +145 -0
- package/src/shared/services/index.ts +2 -0
- package/src/shared/utils/CometChatMessagePreview/CometChatMessagePreview.tsx +42 -18
- package/src/shared/utils/MessageUtils.tsx +13 -4
- package/src/shared/utils/attachmentLimits.ts +156 -0
- package/src/shared/utils/audioPlaybackCoordinator.ts +28 -0
- package/src/shared/utils/batchMediaContext.tsx +30 -0
- package/src/shared/utils/conversationUtils.ts +26 -4
- package/src/shared/utils/groupAttachments.ts +93 -0
- package/src/shared/utils/index.ts +8 -0
- package/src/shared/utils/openMultiFileChooser.ts +123 -0
- package/src/shared/utils/partitionAttachmentsByKind.ts +44 -0
- package/src/shared/views/ClipboardPasteHandler/ClipboardPasteHandler.ts +28 -0
- package/src/shared/views/ClipboardPasteHandler/NativeCometChatClipboardModule.ts +16 -0
- package/src/shared/views/ClipboardPasteHandler/index.ts +2 -0
- package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +1 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentPreview.style.ts +32 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentPreview.tsx +90 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentPreviewItem.tsx +276 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentTile.tsx +827 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentTray.tsx +110 -0
- package/src/shared/views/CometChatAttachmentPreview/StagedVideoDurationProbe.tsx +53 -0
- package/src/shared/views/CometChatAttachmentPreview/index.ts +8 -0
- package/src/shared/views/CometChatAttachmentViewer/CometChatAttachmentViewer.tsx +305 -0
- package/src/shared/views/CometChatAttachmentViewer/index.ts +2 -0
- package/src/shared/views/CometChatAudioBubble/CometChatAudioBubble.tsx +71 -74
- package/src/shared/views/CometChatAudiosBubble/CometChatAudiosBubble.tsx +587 -0
- package/src/shared/views/CometChatAudiosBubble/index.ts +2 -0
- package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +5 -7
- package/src/shared/views/CometChatCaptionText/CometChatCaptionText.tsx +182 -0
- package/src/shared/views/CometChatCaptionText/index.ts +2 -0
- package/src/shared/views/CometChatComposerErrorBanner.tsx +83 -0
- package/src/shared/views/CometChatConversationStarter/CometChatConversationStarter.tsx +141 -0
- package/src/shared/views/CometChatConversationStarter/index.ts +2 -0
- package/src/shared/views/CometChatConversationSummary/CometChatConversationSummary.tsx +155 -0
- package/src/shared/views/CometChatConversationSummary/index.ts +2 -0
- package/src/shared/views/CometChatFileBubble/style.ts +6 -4
- package/src/shared/views/CometChatFilesBubble/CometChatFilesBubble.tsx +316 -0
- package/src/shared/views/CometChatFilesBubble/index.ts +2 -0
- package/src/shared/views/CometChatImagesBubble/CometChatImagesBubble.tsx +323 -0
- package/src/shared/views/CometChatImagesBubble/index.ts +2 -0
- package/src/shared/views/CometChatMediaViewer/CometChatMediaViewer.tsx +425 -0
- package/src/shared/views/CometChatMediaViewer/index.ts +2 -0
- package/src/shared/views/CometChatMediaViewer/mediaViewerUtils.ts +30 -0
- package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +14 -4
- package/src/shared/views/CometChatSendButtonView/CometChatSendButtonView.tsx +1 -0
- package/src/shared/views/CometChatSmartReplies/CometChatSmartReplies.tsx +172 -0
- package/src/shared/views/CometChatSmartReplies/index.ts +2 -0
- package/src/shared/views/CometChatVideoBubble/style.ts +3 -3
- package/src/shared/views/CometChatVideosBubble/CometChatVideosBubble.tsx +441 -0
- package/src/shared/views/CometChatVideosBubble/index.ts +2 -0
- package/src/shared/views/CometChatVoiceNoteBubble/CometChatVoiceNoteBubble.tsx +78 -0
- package/src/shared/views/CometChatVoiceNoteBubble/index.ts +2 -0
- package/src/shared/views/index.ts +37 -1
- package/src/theme/CometChatThemeHelper.ts +8 -0
- package/src/theme/default/color/dark.ts +9 -0
- package/src/theme/default/color/light.ts +10 -0
- package/src/theme/type.ts +73 -0
- package/src/CometChatMessageList/PERFORMANCE_ARCHITECTURE.md +0 -478
- package/src/CometChatMessageList/SEARCH_NAV_PERF_PLAN.md +0 -613
- package/src/shared/CometChatUiKit/CometChatUIKit.changes.md +0 -76
- package/src/shared/CometChatUiKit/checkAuthSettings-review.md +0 -211
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
# `checkAuthSettings` — Code Review & Recommended Approach
|
|
2
|
-
|
|
3
|
-
> File: `packages/ChatUiKit/src/shared/CometChatUiKit/CometChatUIKit.ts`
|
|
4
|
-
> Trigger: "is using `!` the best approach in `if (!this.checkAuthSettings(Promise.reject))`?"
|
|
5
|
-
> Verified against source on review date — **5** call sites, line numbers below.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 1. TL;DR
|
|
10
|
-
|
|
11
|
-
- The `!` you asked about is the **logical NOT operator**, not a TypeScript non-null assertion. It is
|
|
12
|
-
correct and idiomatic — **keep it**. It was never the problem.
|
|
13
|
-
- The real problems sit *around* it:
|
|
14
|
-
1. `checkAuthSettings` is a **side-effecting predicate** — it returns a `boolean` *and* fires an
|
|
15
|
-
`onError` callback. (line 323)
|
|
16
|
-
2. Every caller passes `Promise.reject` as that callback, which creates a **floating, unhandled
|
|
17
|
-
rejected promise**.
|
|
18
|
-
3. `logout()` is the only caller that branches correctly — but it **double-fires** the error.
|
|
19
|
-
4. The other **four** callers (`getLoggedInUser`, `login`, `createUser`, `updateUser`) use the guard
|
|
20
|
-
as a **no-op** — validation is silently skipped.
|
|
21
|
-
5. Separately: `uiKitSettings` is typed non-optional but is `undefined` until `init()` runs — the
|
|
22
|
-
type lies, which is what lets the unsafe `.authKey` access compile.
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## 2. Call-site inventory (verified)
|
|
27
|
-
|
|
28
|
-
| Method | Line | Form | Effect |
|
|
29
|
-
| --- | --- | --- | --- |
|
|
30
|
-
| `getLoggedInUser` | 220 | `if (checkAuthSettings(Promise.reject)) null;` | **no-op** |
|
|
31
|
-
| `login` | 267 | `if (checkAuthSettings(Promise.reject)) null;` | **no-op** |
|
|
32
|
-
| `logout` | 293 | `if (!checkAuthSettings(Promise.reject)) { return Promise.reject(...) }` | branches, but double-fires |
|
|
33
|
-
| `createUser` | 309 | `if (checkAuthSettings(Promise.reject)) { }` | **no-op** |
|
|
34
|
-
| `updateUser` | 316 | `if (checkAuthSettings(Promise.reject)) { }` | **no-op** |
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## 3. The guard itself (line 323)
|
|
39
|
-
|
|
40
|
-
```ts
|
|
41
|
-
// returns boolean AND calls onError as a side effect
|
|
42
|
-
static checkAuthSettings(onError: (e: CometChat.CometChatException) => void): boolean {
|
|
43
|
-
if (this.uiKitSettings == null) {
|
|
44
|
-
if (onError != null) {
|
|
45
|
-
onError(new CometChat.CometChatException({
|
|
46
|
-
code: "ERR", name: "Authentication null",
|
|
47
|
-
message: "Populate authSettings before initializing",
|
|
48
|
-
}));
|
|
49
|
-
}
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
if (!this.uiKitSettings?.appId) {
|
|
53
|
-
if (onError != null) {
|
|
54
|
-
onError(new CometChat.CometChatException({
|
|
55
|
-
code: "appIdErr", name: "APP ID null",
|
|
56
|
-
message: "Populate appId in authSettings before initializing",
|
|
57
|
-
}));
|
|
58
|
-
}
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
return true;
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## 4. Why this is a problem
|
|
68
|
-
|
|
69
|
-
### 4.1 `Promise.reject` as a callback → unhandled rejection
|
|
70
|
-
`Promise.reject(error)` does **not** reject the calling function. It synchronously constructs a new,
|
|
71
|
-
already-rejected promise that nobody awaits or `.catch()`es. On Hermes/Node this surfaces as an
|
|
72
|
-
`UnhandledPromiseRejection` — noise at best, a crash signal at worst.
|
|
73
|
-
|
|
74
|
-
### 4.2 Dual contract (command + query)
|
|
75
|
-
`checkAuthSettings` both **answers a question** (is config valid?) and **performs an action** (fire the
|
|
76
|
-
error). Callers can't tell from the signature that calling it has side effects — which is precisely how
|
|
77
|
-
the no-op call sites slipped in. A predicate should be pure.
|
|
78
|
-
|
|
79
|
-
### 4.3 `logout()` double-fires (line 293)
|
|
80
|
-
```ts
|
|
81
|
-
if (!this.checkAuthSettings(Promise.reject)) { // (a) fires Promise.reject(error) internally
|
|
82
|
-
return Promise.reject(new CometChat.CometChatException({ code: "ERR", ... })); // (b) fires again
|
|
83
|
-
}
|
|
84
|
-
```
|
|
85
|
-
`(a)` is an unhandled rejection that also carries the *more specific* code (`appIdErr` when appId is
|
|
86
|
-
missing); `(b)` is the real return but always uses the generic `ERR`. One failure, two error objects,
|
|
87
|
-
worse error code.
|
|
88
|
-
|
|
89
|
-
### 4.4 Four call sites validate nothing
|
|
90
|
-
`if (cond) null;` and `if (cond) {}` are no-ops — the result is computed and thrown away. `getLoggedInUser`,
|
|
91
|
-
`login`, `createUser`, and `updateUser` proceed even when `uiKitSettings` is `null`, deferring to a
|
|
92
|
-
later, more cryptic crash (e.g. `this.uiKitSettings.authKey` reading a property of `undefined`).
|
|
93
|
-
|
|
94
|
-
### 4.5 The type lies (line 21)
|
|
95
|
-
```ts
|
|
96
|
-
static uiKitSettings: UIKitSettings; // declared always-present, but undefined until init()
|
|
97
|
-
```
|
|
98
|
-
Because the declared type is non-optional, TypeScript believes `this.uiKitSettings.authKey` is always
|
|
99
|
-
safe — so the unsafe access in `createUser`/`updateUser` compiles cleanly. The type should be
|
|
100
|
-
`UIKitSettings | undefined` so the compiler forces a guard.
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
## 5. Recommended approach
|
|
105
|
-
|
|
106
|
-
Make `checkAuthSettings` a **pure predicate**, centralize the exception in a factory, and let each
|
|
107
|
-
caller decide how to report failure. Throwing assertions (no eager `Promise.reject`) avoid
|
|
108
|
-
re-introducing the unhandled-rejection footgun.
|
|
109
|
-
|
|
110
|
-
> ⚠️ **Breaking change:** dropping `onError` changes the signature of the `static` (public)
|
|
111
|
-
> `checkAuthSettings`. Grep the repo + consuming apps and migrate all callers, or keep `onError`
|
|
112
|
-
> optional and ignore it. Treat as a semver-minor/major change, not a drop-in edit.
|
|
113
|
-
|
|
114
|
-
### 5.1 Pure predicate + error factory + throwing assert
|
|
115
|
-
```ts
|
|
116
|
-
/** Pure predicate: is the UIKit configured well enough to make authenticated calls? */
|
|
117
|
-
static checkAuthSettings(): boolean {
|
|
118
|
-
return this.uiKitSettings != null && !!this.uiKitSettings.appId;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/** Single source of truth for the "not initialized" exception (preserves the specific code). */
|
|
122
|
-
private static authError(): CometChat.CometChatException {
|
|
123
|
-
if (this.uiKitSettings == null) {
|
|
124
|
-
return new CometChat.CometChatException({
|
|
125
|
-
code: "ERR", name: "Authentication null",
|
|
126
|
-
message: "Populate authSettings before initializing. Call CometChatUIKit.init() first.",
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
return new CometChat.CometChatException({
|
|
130
|
-
code: "appIdErr", name: "APP ID null",
|
|
131
|
-
message: "Populate appId in authSettings before initializing.",
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/** Throws the right exception when unconfigured. Works in sync (caught below) and async methods. */
|
|
136
|
-
private static assertInitialized(): void {
|
|
137
|
-
if (!this.checkAuthSettings()) throw this.authError();
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
### 5.2 Call sites — async methods just `throw`
|
|
142
|
-
```ts
|
|
143
|
-
static async getLoggedInUser(): Promise<CometChat.User> {
|
|
144
|
-
this.assertInitialized(); // rejection is automatic in an async fn
|
|
145
|
-
// ...existing logic
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
static async login({ uid, authToken }: { uid?: string; authToken?: string }): Promise<CometChat.User> {
|
|
149
|
-
this.assertInitialized(); // keep the destructured params — body uses uid/authToken
|
|
150
|
-
// ...existing logic
|
|
151
|
-
}
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
### 5.3 Call sites — sync methods return a rejected promise once
|
|
155
|
-
```ts
|
|
156
|
-
static logout(): Promise<Object> {
|
|
157
|
-
if (!this.checkAuthSettings()) return Promise.reject(this.authError()); // single fire, correct code
|
|
158
|
-
return CometChat.logout().then(() => {
|
|
159
|
-
CometChatUIKit.loggedInUser = null;
|
|
160
|
-
return {};
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
static createUser(user: CometChat.User): Promise<CometChat.User> {
|
|
165
|
-
if (!this.checkAuthSettings()) return Promise.reject(this.authError());
|
|
166
|
-
// authKey is safe here because checkAuthSettings() guaranteed uiKitSettings is set
|
|
167
|
-
return CometChat.createUser(user, this.uiKitSettings.authKey as string);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
static updateUser(user: CometChat.User): Promise<CometChat.User> {
|
|
171
|
-
if (!this.checkAuthSettings()) return Promise.reject(this.authError());
|
|
172
|
-
return CometChat.updateUser(user, this.uiKitSettings.authKey as string);
|
|
173
|
-
}
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
> Why not a `requireAuth()` helper that returns a `Promise.reject`? Because building the rejected
|
|
177
|
-
> promise inside the helper makes it float unhandled for a microtask if the caller `await`s anything
|
|
178
|
-
> before returning it — re-creating bug 4.1. A **throwing** assert has no such window.
|
|
179
|
-
|
|
180
|
-
---
|
|
181
|
-
|
|
182
|
-
## 6. Before / After
|
|
183
|
-
|
|
184
|
-
| Concern | Before | After |
|
|
185
|
-
| --- | --- | --- |
|
|
186
|
-
| `checkAuthSettings` contract | boolean **+** side effect | pure boolean predicate |
|
|
187
|
-
| `checkAuthSettings` signature | `(onError)` | `()` — **breaking; migrate callers** |
|
|
188
|
-
| Unhandled rejections | yes (`Promise.reject` as callback) | none (throw / single return) |
|
|
189
|
-
| `logout` error firing | twice; generic code wins | once; specific code preserved |
|
|
190
|
-
| `getLoggedInUser` / `login` validation | no-op (`if (...) null;`) | real guard |
|
|
191
|
-
| `createUser` / `updateUser` validation | no-op (empty block) | real guard |
|
|
192
|
-
| Error message source | duplicated inline ×5 | single `authError()` factory |
|
|
193
|
-
| `uiKitSettings` type | non-optional (lies) | `UIKitSettings \| undefined` (optional improvement) |
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
|
-
## 7. Answer to the original question
|
|
198
|
-
|
|
199
|
-
`if (!this.checkAuthSettings())` is the clearest way to express "bail out when config is invalid" — the
|
|
200
|
-
`!` is correct and should stay. What actually deserved scrutiny was the side-effecting validator and the
|
|
201
|
-
`Promise.reject`-as-callback pattern wrapped around it. Fix those (pure predicate + factory + throwing
|
|
202
|
-
assert) and the `!` reads exactly as intended at every call site.
|
|
203
|
-
|
|
204
|
-
---
|
|
205
|
-
|
|
206
|
-
## 8. Follow-ups (out of scope here)
|
|
207
|
-
|
|
208
|
-
- Change `uiKitSettings` to `UIKitSettings | undefined` so the compiler enforces the guard.
|
|
209
|
-
- Add unit tests asserting each public method rejects with the right `code` when `uiKitSettings` is
|
|
210
|
-
`null` and when `appId` is missing (covers all 5 call sites).
|
|
211
|
-
- Consider a lint rule against expression-statement no-ops (`if (x) null;`) to prevent regressions.
|