Skip to content

Commit

Permalink
[FEAT/#8] NoRippleInteractionSource ์ถ”๊ฐ€
Browse files Browse the repository at this point in the history
  • Loading branch information
arinming committed Jul 5, 2024
1 parent 2d99302 commit c6696c0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions feature/src/main/java/com/terning/feature/main/MainScreen.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.terning.feature.main

import androidx.compose.animation.AnimatedVisibility
import androidx.compose.foundation.interaction.Interaction
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
Expand All @@ -24,6 +26,8 @@ import com.terning.feature.calendar.navigation.calendarNavGraph
import com.terning.feature.home.navigation.homeNavGraph
import com.terning.feature.mypage.navigation.myPageNavGraph
import com.terning.feature.search.navigation.searchNavGraph
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.emptyFlow

@Composable
fun MainScreen(
Expand Down Expand Up @@ -70,6 +74,7 @@ private fun MainBottomBar(
NavigationBar {
tabs.forEach { itemType ->
NavigationBarItem(
interactionSource = NoRippleInteractionSource,
selected = currentTab == itemType,
onClick = {
onTabSelected(itemType)
Expand All @@ -94,8 +99,19 @@ private fun MainBottomBar(
LocalAbsoluteTonalElevation.current
)
)

)
}
}
}
}


private object NoRippleInteractionSource : MutableInteractionSource {

override val interactions: Flow<Interaction> = emptyFlow()

override suspend fun emit(interaction: Interaction) {}

override fun tryEmit(interaction: Interaction) = true
}

0 comments on commit c6696c0

Please sign in to comment.