Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3573018
D10118.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
985 B
Referenced Files
None
Subscribers
None
D10118.id.diff
View Options
diff --git a/native/roles/role-panel-entry.react.js b/native/roles/role-panel-entry.react.js
--- a/native/roles/role-panel-entry.react.js
+++ b/native/roles/role-panel-entry.react.js
@@ -6,6 +6,7 @@
import { Platform, Text, TouchableOpacity, View } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
+import { roleIsDefaultRole } from 'lib/shared/thread-utils.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { UserSurfacedPermission } from 'lib/types/thread-permission-types.js';
@@ -39,8 +40,8 @@
);
invariant(existingRoleID, 'Role ID must exist for an existing role');
- const defaultRoleID = Object.keys(threadInfo.roles).find(
- roleID => threadInfo.roles[roleID].isDefault,
+ const defaultRoleID = Object.keys(threadInfo.roles).find(roleID =>
+ roleIsDefaultRole(threadInfo.roles[roleID]),
);
invariant(defaultRoleID, 'Default role ID must exist');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 29, 1:45 PM (8 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2732417
Default Alt Text
D10118.id.diff (985 B)
Attached To
Mode
D10118: [native] Update existing checks on isDefault in role-panel-entry.react.js
Attached
Detach File
Event Timeline
Log In to Comment