mirror of
https://gitee.com/openharmony/applications_photos
synced 2024-11-23 15:10:25 +00:00
Merge pull request !370 from Evgeniy Nikeytsev/fix1
This commit is contained in:
commit
0ee1cf2a66
@ -134,7 +134,7 @@ class ScreenManager {
|
||||
}
|
||||
let cb;
|
||||
let i = cbs.length;
|
||||
while (i--) {
|
||||
while (i-- != 0) {
|
||||
cb = cbs[i];
|
||||
if (cb === fn || cb.fn === fn) {
|
||||
cbs.splice(i, 1);
|
||||
|
@ -162,20 +162,9 @@ struct PhotoBrowser {
|
||||
if (currentPhoto == undefined) {
|
||||
return;
|
||||
}
|
||||
// Hack with TS type system
|
||||
let info: object | string = null
|
||||
if (this.albumInfo != undefined && this.albumInfo != null && this.albumInfo.id != undefined && this.albumInfo.id != null) {
|
||||
info = this.albumInfo.id
|
||||
} else {
|
||||
if (this.albumInfo != undefined && this.albumInfo != null) {
|
||||
info = this.albumInfo.id
|
||||
} else {
|
||||
info = this.albumInfo
|
||||
}
|
||||
}
|
||||
menuContext.withItems([currentPhoto])
|
||||
.withDeletePageFromType(BroadcastConstants.DELETE_FROM_BROWSER)
|
||||
.withAlbumId(info as string)
|
||||
.withAlbumId( Boolean<string>(this.albumInfo.id).valueOf() ? this.albumInfo.id : (Boolean<SimpleAlbumDataItem>(this.albumInfo).valueOf() ? this.albumInfo.toString() : "") )
|
||||
.withBroadCast(this.broadCast)
|
||||
.withOperationEndCallback(this.onDeleteEnd.bind(this))
|
||||
menuOperation = new BatchDeleteMenuOperation(menuContext);
|
||||
|
Loading…
Reference in New Issue
Block a user