Skip to content

Commit

Permalink
uri 숨기기
Browse files Browse the repository at this point in the history
  • Loading branch information
JuTaK97 committed Mar 30, 2024
1 parent 11afc89 commit ec9a4c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ import kotlinx.coroutines.withContext

object DeeplinkExecutor {
val deeplinkUri = mutableStateOf(Uri.EMPTY)
fun execute(uri: Uri) {
deeplinkUri.value = uri
fun execute(deeplink: String?) {
deeplink?.let {
deeplinkUri.value = Uri.parse(it)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.wafflestudio.snutt2.views.logged_in.notifications

import android.net.Uri
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
Expand Down Expand Up @@ -81,8 +80,7 @@ fun NotificationPage() {
items(notificationList) {
it?.let {
NotificationItem(it, onClick = {
val uri = Uri.parse(it.deeplink ?: return@NotificationItem)
DeeplinkExecutor.execute(uri)
DeeplinkExecutor.execute(it.deeplink)
},)
}
}
Expand Down

0 comments on commit ec9a4c7

Please sign in to comment.