Add back haptic feedback long tap to fav (#8418)
* Add back haptic feedback long tap to fav - add back haptic when long tap on manga to add to library * simplify * Revert "simplify" This reverts commitf4bd57315a
. * Revert "Add back haptic feedback long tap to fav" This reverts commit81486e30e9
. * cleanup
This commit is contained in:
parent
280b0f42db
commit
34aa4eb291
@ -5,7 +5,9 @@ import androidx.activity.compose.BackHandler
|
|||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.runtime.rememberCoroutineScope
|
import androidx.compose.runtime.rememberCoroutineScope
|
||||||
|
import androidx.compose.ui.hapticfeedback.HapticFeedbackType
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
|
import androidx.compose.ui.platform.LocalHapticFeedback
|
||||||
import androidx.core.os.bundleOf
|
import androidx.core.os.bundleOf
|
||||||
import eu.kanade.domain.source.model.Source
|
import eu.kanade.domain.source.model.Source
|
||||||
import eu.kanade.presentation.browse.BrowseSourceScreen
|
import eu.kanade.presentation.browse.BrowseSourceScreen
|
||||||
@ -50,6 +52,7 @@ open class BrowseSourceController(bundle: Bundle) :
|
|||||||
override fun ComposeContent() {
|
override fun ComposeContent() {
|
||||||
val scope = rememberCoroutineScope()
|
val scope = rememberCoroutineScope()
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
|
val haptic = LocalHapticFeedback.current
|
||||||
|
|
||||||
BrowseSourceScreen(
|
BrowseSourceScreen(
|
||||||
presenter = presenter,
|
presenter = presenter,
|
||||||
@ -64,6 +67,7 @@ open class BrowseSourceController(bundle: Bundle) :
|
|||||||
duplicateManga != null -> presenter.dialog = Dialog.AddDuplicateManga(manga, duplicateManga)
|
duplicateManga != null -> presenter.dialog = Dialog.AddDuplicateManga(manga, duplicateManga)
|
||||||
else -> presenter.addFavorite(manga)
|
else -> presenter.addFavorite(manga)
|
||||||
}
|
}
|
||||||
|
haptic.performHapticFeedback(HapticFeedbackType.LongPress)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onWebViewClick = f@{
|
onWebViewClick = f@{
|
||||||
|
Loading…
Reference in New Issue
Block a user