Skip to content

Commit

Permalink
Remove the Claim profile button when Empty state in the profile card (#…
Browse files Browse the repository at this point in the history
…563)

* Remove the Claim profile button when Empty state in the profile card

* Generate quickeditor.api file
  • Loading branch information
AdamGrzybkowski authored Jan 28, 2025
1 parent b29015c commit a366224
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gravatar-quickeditor/api/gravatar-quickeditor.api
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,11 @@ public final class com/gravatar/quickeditor/ui/components/ComposableSingletons$P

public final class com/gravatar/quickeditor/ui/components/ComposableSingletons$ProfileCardKt {
public static final field INSTANCE Lcom/gravatar/quickeditor/ui/components/ComposableSingletons$ProfileCardKt;
public static field lambda-1 Lkotlin/jvm/functions/Function2;
public static field lambda-1 Lkotlin/jvm/functions/Function3;
public static field lambda-2 Lkotlin/jvm/functions/Function2;
public fun <init> ()V
public final fun getLambda-1$gravatar_quickeditor_release ()Lkotlin/jvm/functions/Function2;
public final fun getLambda-1$gravatar_quickeditor_release ()Lkotlin/jvm/functions/Function3;
public final fun getLambda-2$gravatar_quickeditor_release ()Lkotlin/jvm/functions/Function2;
}

public final class com/gravatar/quickeditor/ui/components/ComposableSingletons$QEButtonKt {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.content.res.Configuration
import androidx.compose.foundation.background
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.shape.CircleShape
Expand All @@ -28,6 +29,7 @@ import com.gravatar.ui.GravatarTheme
import com.gravatar.ui.components.ComponentState
import com.gravatar.ui.components.ProfileSummary
import com.gravatar.ui.components.atomic.Avatar
import com.gravatar.ui.components.atomic.ViewProfileButton
import com.gravatar.ui.components.transform

@Composable
Expand Down Expand Up @@ -59,6 +61,14 @@ internal fun ProfileCard(
modifier = Modifier.clip(CircleShape),
)
},
viewProfile = { state ->
if (state !is ComponentState.Empty) {
ViewProfileButton(
state = state,
modifier = Modifier.height(32.dp),
)
}
},
)
}
}
Expand Down

0 comments on commit a366224

Please sign in to comment.