Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32179227
D8068.1765072723.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8068.1765072723.diff
View Options
diff --git a/native/chat/settings/thread-settings-member.react.js b/native/chat/settings/thread-settings-member.react.js
--- a/native/chat/settings/thread-settings-member.react.js
+++ b/native/chat/settings/thread-settings-member.react.js
@@ -16,11 +16,7 @@
} from 'lib/actions/thread-actions.js';
import { useENSNames } from 'lib/hooks/ens-cache.js';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
-import {
- memberIsAdmin,
- memberHasAdminPowers,
- getAvailableThreadMemberActions,
-} from 'lib/shared/thread-utils.js';
+import { getAvailableThreadMemberActions } from 'lib/shared/thread-utils.js';
import { stringForUser } from 'lib/shared/user-utils.js';
import type { LoadingStatus } from 'lib/types/loading-types.js';
import {
@@ -130,24 +126,17 @@
);
}
- let roleInfo = null;
- if (memberIsAdmin(this.props.memberInfo, this.props.threadInfo)) {
- roleInfo = (
- <View style={this.props.styles.row}>
- <Text style={this.props.styles.role} numberOfLines={1}>
- admin
- </Text>
- </View>
- );
- } else if (memberHasAdminPowers(this.props.memberInfo)) {
- roleInfo = (
- <View style={this.props.styles.row}>
- <Text style={this.props.styles.role} numberOfLines={1}>
- parent admin
- </Text>
- </View>
- );
- }
+ const roleName =
+ this.props.memberInfo.role &&
+ this.props.threadInfo.roles[this.props.memberInfo.role].name;
+
+ const roleInfo = (
+ <View style={this.props.styles.row}>
+ <Text style={this.props.styles.role} numberOfLines={1}>
+ {roleName}
+ </Text>
+ </View>
+ );
const firstItem = this.props.firstListItem
? null
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 7, 1:58 AM (19 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5842049
Default Alt Text
D8068.1765072723.diff (1 KB)
Attached To
Mode
D8068: [native] Refactor the members list to support any variety of role labels
Attached
Detach File
Event Timeline
Log In to Comment