Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.into.websoso.feature.feed.component

import android.view.HapticFeedbackConstants
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
Expand Down Expand Up @@ -34,6 +35,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalView
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
Expand Down Expand Up @@ -76,9 +78,13 @@ internal fun FeedSection(
isLoading: Boolean,
isRefreshing: Boolean,
) {
val view = LocalView.current
PullToRefreshBox(
isRefreshing = isRefreshing,
onRefresh = onRefreshPull,
onRefresh = {
view.performHapticFeedback(HapticFeedbackConstants.CONFIRM)
onRefreshPull()
},
modifier = Modifier.fillMaxSize(),
) {
when {
Expand Down
Loading