Toggle navigation
Toggle navigation
This project
Loading...
Sign in
mobile
/
YH_RNComponent
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
张丽霞
7 years ago
Commit
bfdbf4969fd8bda0c54e848d33345fa958c4920a
1 parent
1afee86a
Fix 当前浏览记录下只有一个商品时侧滑删除后 tag切换crash,review by Redding
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
js/recorder/reducers/browse/browseActions.js
js/recorder/reducers/browse/browseActions.js
View file @
bfdbf49
...
...
@@ -190,6 +190,7 @@ export function deleteOneHistory(skn, index) {
return
new
BrowseService
(
app
.
host
).
deleteHistory
(
skn
,
uid
,
sourcePage
)
.
then
(
json
=>
{
let
{
productList
,
selectedProductList
}
=
browse
;
let
selectedProduct
=
selectedProductList
.
toJS
()[
index
];
selectedProductList
=
selectedProductList
.
delete
(
index
);
let
lists
=
productList
.
toArray
();
let
indexInAll
=
productList
.
findIndex
((
item
,
i
)
=>
{
...
...
@@ -198,7 +199,12 @@ export function deleteOneHistory(skn, index) {
if
(
indexInAll
!=
-
1
)
{
productList
=
productList
.
delete
(
indexInAll
);
}
dispatch
(
historyDeleteSuccess
({
productList
,
selectedProductList
}));
if
(
selectedProductList
.
size
==
0
||
selectedProductList
.
length
==
0
)
{
dispatch
(
deleteSelectedProducts
([
selectedProduct
]));
}
else
{
dispatch
(
historyDeleteSuccess
({
productList
,
selectedProductList
}));
}
let
show
=
productList
.
size
>
0
;
ReactNative
.
NativeModules
.
YH_RecorderHelper
.
setRightClearButtonVisiblity
(
show
);
})
...
...
Please
register
or
login
to post a comment