NTP-71719 | added autoscroll support (#16573)
This commit is contained in:
committed by
GitHub
parent
7304affbe3
commit
29b2bc620a
@@ -155,6 +155,8 @@ import com.navi.rr.utils.constants.Constants.NOTIFY_WIDGET_DISMISSED
|
||||
import com.navi.rr.utils.constants.Constants.OPEN_APP_SETTINGS
|
||||
import com.navi.rr.utils.constants.Constants.PERMISSIONS_GIVEN
|
||||
import com.navi.rr.utils.constants.Constants.PERMISSION_BOTTOMSHEET
|
||||
import com.navi.rr.utils.constants.Constants.SCROLL_TO_WIDGET_NAME
|
||||
import com.navi.rr.utils.constants.Constants.SCROLL_TO_WIDGET_OFFSET
|
||||
import com.navi.rr.utils.constants.Constants.TRUE
|
||||
import com.navi.rr.utils.dpToPx
|
||||
import com.navi.rr.utils.ext.toJson
|
||||
@@ -500,6 +502,19 @@ fun CoinHomeScreenV2(
|
||||
}
|
||||
is CoinHomeScreenV2State.Success -> {
|
||||
|
||||
LaunchedEffect(Unit) {
|
||||
val widgetName = bundleData?.getString(SCROLL_TO_WIDGET_NAME)
|
||||
val offset =
|
||||
bundleData?.getString(SCROLL_TO_WIDGET_OFFSET)?.toFloatOrNull()
|
||||
?: -100f
|
||||
|
||||
if (!widgetName.isNullOrEmpty()) {
|
||||
scrollToWidget(
|
||||
ScrollToAction(widgetName = widgetName, offset = offset)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
var backdropValue =
|
||||
remember(
|
||||
state.data.screenStructure
|
||||
|
||||
@@ -97,6 +97,8 @@ object Constants {
|
||||
const val REFERRAL_SHARE_SCREEN = "REFERRAL_SHARE_SCREEN"
|
||||
const val IS_REFERRAL_SHARE_SCREEN = "isReferralShareScreen"
|
||||
const val AUTO_REDEEM_KEY = "auto_redeem"
|
||||
const val SCROLL_TO_WIDGET_NAME = "SCROLL_TO_WIDGET_NAME"
|
||||
const val SCROLL_TO_WIDGET_OFFSET = "SCROLL_TO_WIDGET_OFFSET"
|
||||
const val SHARE_KARO = "SHARE_KARO"
|
||||
const val IS_LEFT_TO_RIGHT_TRANSITION = "isLeftToRightTransition"
|
||||
const val FALSE = "false"
|
||||
|
||||
Reference in New Issue
Block a user