-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
🔧 Compose ImageLoader に乗り換え
- Loading branch information
Showing
9 changed files
with
19 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ kotlin { | |
sourceSets { | ||
commonMain { | ||
dependencies { | ||
api(libs.imageLoader) | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,10 +31,5 @@ kotlin { | |
implementation(libs.kermit) | ||
} | ||
} | ||
androidMain { | ||
dependencies { | ||
implementation(libs.composeCoil) | ||
} | ||
} | ||
} | ||
} |
29 changes: 0 additions & 29 deletions
29
core/ui/src/androidMain/kotlin/club/nito/core/ui/ProfileImage.android.kt
This file was deleted.
Oops, something went wrong.
18 changes: 16 additions & 2 deletions
18
core/ui/src/commonMain/kotlin/club/nito/core/ui/ProfileImage.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
package club.nito.core.ui | ||
|
||
import androidx.compose.foundation.Image | ||
import androidx.compose.foundation.shape.CircleShape | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.draw.clip | ||
import androidx.compose.ui.layout.ContentScale | ||
import club.nito.core.model.UserProfile | ||
import com.seiko.imageloader.rememberImagePainter | ||
|
||
@Composable | ||
public expect fun ProfileImage( | ||
public fun ProfileImage( | ||
profile: UserProfile, | ||
modifier: Modifier = Modifier, | ||
) | ||
) { | ||
Image( | ||
painter = rememberImagePainter( | ||
url = profile.avatarUrl, | ||
), | ||
contentDescription = profile.displayName, | ||
contentScale = ContentScale.Crop, | ||
modifier = modifier.clip(CircleShape), | ||
) | ||
} |
Empty file.
15 changes: 0 additions & 15 deletions
15
core/ui/src/iosMain/kotlin/club/nito/core/ui/ProfileImage.ios.kt
This file was deleted.
Oops, something went wrong.
Empty file.
9 changes: 0 additions & 9 deletions
9
core/ui/src/jsMain/kotlin/club/nito/core/ui/ProfileImage.js.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters