Skip to content

Commit 27e7c51

Browse files
committed
Even more not available dialogs in profile
1 parent 315f64b commit 27e7c51

File tree

1 file changed

+9
-3
lines changed
  • Jetchat/app/src/main/java/com/example/compose/jetchat/profile

1 file changed

+9
-3
lines changed

Jetchat/app/src/main/java/com/example/compose/jetchat/profile/Profile.kt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ fun ProfileScreen(userData: ProfileScreenState, onNavIconPressed: () -> Unit = {
120120
ProfileFab(
121121
extended = scrollState.value == 0,
122122
userIsMe = userData.isMe(),
123-
modifier = Modifier.align(Alignment.BottomEnd)
123+
modifier = Modifier.align(Alignment.BottomEnd),
124+
onFabClicked = { functionalityNotAvailablePopupShown = true }
124125
)
125126
}
126127
}
@@ -239,11 +240,16 @@ fun ProfileError() {
239240
}
240241

241242
@Composable
242-
fun ProfileFab(extended: Boolean, userIsMe: Boolean, modifier: Modifier = Modifier) {
243+
fun ProfileFab(
244+
extended: Boolean,
245+
userIsMe: Boolean,
246+
modifier: Modifier = Modifier,
247+
onFabClicked: () -> Unit = { }
248+
) {
243249

244250
key(userIsMe) { // Prevent multiple invocations to execute during composition
245251
FloatingActionButton(
246-
onClick = { /* TODO */ },
252+
onClick = onFabClicked,
247253
modifier = modifier
248254
.padding(16.dp)
249255
.navigationBarsPadding()

0 commit comments

Comments
 (0)