Skip to content

Commit

Permalink
[MOB-1672] Emoji 변환 로직 추가 (#44)
Browse files Browse the repository at this point in the history
* EmojiExtensions 추가

* internet permission 추가
  • Loading branch information
sodp5 authored Jul 31, 2024
1 parent d0e5081 commit 1bbec63
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bezier/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package io.channel.bezier.extension

import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.painter.Painter
import coil.compose.rememberAsyncImagePainter
import java.net.URLEncoder

private const val emojiUrl = "https://cf.channel.io/asset/emoji/images/80/%s.png"

internal val String.toEmojiPainter: Painter
@Composable
get() = rememberAsyncImagePainter(model = emojiUrl.format(URLEncoder.encode(this, "UTF-8")))

0 comments on commit 1bbec63

Please sign in to comment.