esoftplay 0.0.236 → 0.0.238
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -184,7 +184,7 @@ export default class m extends LibComponent<LibCarrouselProps, LibCarrouselState
|
|
|
184
184
|
if (this.state.childrenLength > 1) {
|
|
185
185
|
const offset = { ...event.nativeEvent.contentOffset };
|
|
186
186
|
const page = this._calculateCurrentPage(offset.x);
|
|
187
|
-
const originalPage = Math.round(offset / this.state.size.width);
|
|
187
|
+
const originalPage = Math.round(offset.x / this.state.size.width);
|
|
188
188
|
if (originalPage != page)
|
|
189
189
|
this._placeCritical(page);
|
|
190
190
|
this._setCurrentPage(page);
|
|
@@ -195,12 +195,12 @@ export default {
|
|
|
195
195
|
},
|
|
196
196
|
/** Klik [disini](https://github.com/dev-esoftplay/mobile-docs/blob/main/modules/lib/navigation.md#reset) untuk melihat dokumentasi*/
|
|
197
197
|
reset(route?: LibNavigationRoutes, ...routes: LibNavigationRoutes[]): void {
|
|
198
|
+
this._ref?.dispatch?.(StackActions.popToTop());
|
|
198
199
|
const user = UserClass.state().get()
|
|
199
200
|
let _route = [route || esp.config('home', (user && (user.id || user.user_id || user.apikey)) ? 'member' : 'public')]
|
|
200
201
|
if (routes && routes.length > 0) {
|
|
201
202
|
_route = [..._route, ...routes]
|
|
202
203
|
}
|
|
203
|
-
this._ref?.dispatch?.(StackActions.popToTop());
|
|
204
204
|
const resetAction = CommonActions.reset({
|
|
205
205
|
index: _route.length - 1,
|
|
206
206
|
routes: _route.map((rn) => ({ name: rn }))
|