Skip to content

Commit 8ca3c2f

Browse files
committed
enable user list editing for not following
1 parent 62d6e43 commit 8ca3c2f

File tree

1 file changed

+28
-28
lines changed
  • compose-ui/src/commonMain/kotlin/dev/dimension/flare/ui/component

1 file changed

+28
-28
lines changed

compose-ui/src/commonMain/kotlin/dev/dimension/flare/ui/component/ProfileMenu.kt

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -62,36 +62,36 @@ public fun ProfileMenu(
6262
expanded = showMoreMenus,
6363
onDismissRequest = { setShowMoreMenus(false) },
6464
) {
65-
profileState.relationState.onSuccess { relation ->
66-
if (!profileState.isGuestMode && relation.following) {
67-
profileState.isListDataSource.onSuccess { isListDataSource ->
68-
if (isListDataSource) {
69-
PlatformDropdownMenuItem(
70-
text = {
71-
PlatformText(
72-
text =
73-
stringResource(
74-
Res.string.user_follow_edit_list,
75-
),
76-
)
77-
},
78-
onClick = {
79-
setShowMoreMenus(false)
80-
toEditAccountList.invoke()
81-
},
82-
leadingIcon = {
83-
FAIcon(
84-
imageVector = FontAwesomeIcons.Solid.List,
85-
contentDescription =
86-
stringResource(
87-
Res.string.user_follow_edit_list,
88-
),
89-
)
90-
},
91-
)
92-
}
65+
if (!profileState.isGuestMode) {
66+
profileState.isListDataSource.onSuccess { isListDataSource ->
67+
if (isListDataSource) {
68+
PlatformDropdownMenuItem(
69+
text = {
70+
PlatformText(
71+
text =
72+
stringResource(
73+
Res.string.user_follow_edit_list,
74+
),
75+
)
76+
},
77+
onClick = {
78+
setShowMoreMenus(false)
79+
toEditAccountList.invoke()
80+
},
81+
leadingIcon = {
82+
FAIcon(
83+
imageVector = FontAwesomeIcons.Solid.List,
84+
contentDescription =
85+
stringResource(
86+
Res.string.user_follow_edit_list,
87+
),
88+
)
89+
},
90+
)
9391
}
9492
}
93+
}
94+
profileState.relationState.onSuccess { relation ->
9595
profileState.canSendMessage.onSuccess {
9696
if (it) {
9797
PlatformDropdownMenuItem(

0 commit comments

Comments
 (0)