Skip to content

Commit 40bbbda

Browse files
DROID-3239 Profile | Fix | Loading state for profile image (#2013)
1 parent 13a7d21 commit 40bbbda

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

core-ui/src/main/java/com/anytypeio/anytype/core_ui/features/profile/ParticipantScreen.kt

+4-2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import com.anytypeio.anytype.presentation.profile.ParticipantViewModel.UiPartici
4040
import com.anytypeio.anytype.presentation.profile.ProfileIconView
4141
import com.bumptech.glide.integration.compose.ExperimentalGlideComposeApi
4242
import com.bumptech.glide.integration.compose.GlideImage
43+
import com.bumptech.glide.integration.compose.placeholder
4344

4445
@OptIn(ExperimentalMaterial3Api::class)
4546
@Composable
@@ -150,7 +151,8 @@ private fun ImageBlock(
150151
.clip(shape = CircleShape)
151152
.noRippleClickable {
152153
onProfileIconClick.invoke()
153-
}
154+
},
155+
loading = placeholder(R.drawable.ic_loading_state_112)
154156
)
155157
}
156158

@@ -221,7 +223,7 @@ fun ParticipantScreenPreview() {
221223
ParticipantScreen(
222224
uiState = UiParticipantScreenState.Data(
223225
name = "Ivanov Konstantin",
224-
icon = ProfileIconView.Emoji(""),
226+
icon = ProfileIconView.Image("dsdas"),
225227
description = "some desc",
226228
isOwner = true
227229
),
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:aapt="http://schemas.android.com/aapt"
3+
android:width="112dp"
4+
android:height="112dp"
5+
android:viewportWidth="112"
6+
android:viewportHeight="112">
7+
<path
8+
android:pathData="M56,56m-24.89,0a24.89,24.89 0,1 1,49.78 0a24.89,24.89 0,1 1,-49.78 0"
9+
android:strokeWidth="7.11111"
10+
android:fillColor="#00000000">
11+
<aapt:attr name="android:strokeColor">
12+
<gradient
13+
android:centerX="56"
14+
android:centerY="56"
15+
android:gradientRadius="28.44"
16+
android:type="radial">
17+
<item android:offset="0" android:color="@color/loading_start_transparent"/>
18+
<item android:offset="1" android:color="@color/loading_end"/>
19+
</gradient>
20+
</aapt:attr>
21+
</path>
22+
</vector>

0 commit comments

Comments
 (0)