Commit 979e0e3 1 parent bae9744 commit 979e0e3 Copy full SHA for 979e0e3
File tree 2 files changed +14
-15
lines changed
gui/src/dashboard/components/dashboard
2 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -1430,23 +1430,16 @@ export function detectVersionLifecycle(version: string) {
1430
1430
/** Return a positive number if `a > b`, a negative number if `a < b`, and zero if `a === b`. */
1431
1431
export function compareAssets ( a : AnyAsset , b : AnyAsset ) {
1432
1432
const relativeTypeOrder = ASSET_TYPE_ORDER [ a . type ] - ASSET_TYPE_ORDER [ b . type ]
1433
+
1433
1434
if ( relativeTypeOrder !== 0 ) {
1434
1435
return relativeTypeOrder
1435
- } else {
1436
- const aModified = Number ( new Date ( a . modifiedAt ) )
1437
- const bModified = Number ( new Date ( b . modifiedAt ) )
1438
- const modifiedDelta = aModified - bModified
1439
- if ( modifiedDelta !== 0 ) {
1440
- // Sort by date descending, rather than ascending.
1441
- return - modifiedDelta
1442
- } else {
1443
- return (
1444
- a . title > b . title ? 1
1445
- : a . title < b . title ? - 1
1446
- : 0
1447
- )
1448
- }
1449
1436
}
1437
+
1438
+ return (
1439
+ a . title > b . title ? 1
1440
+ : a . title < b . title ? - 1
1441
+ : 0
1442
+ )
1450
1443
}
1451
1444
1452
1445
// ==================
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ import AssetListEventType from '#/events/AssetListEventType'
27
27
import AssetContextMenu from '#/layouts/AssetContextMenu'
28
28
import type * as assetsTable from '#/layouts/AssetsTable'
29
29
import * as eventListProvider from '#/layouts/AssetsTable/EventListProvider'
30
- import { isCloudCategory } from '#/layouts/CategorySwitcher/Category'
30
+ import { isCloudCategory , isLocalCategory } from '#/layouts/CategorySwitcher/Category'
31
31
import * as localBackend from '#/services/LocalBackend'
32
32
33
33
import * as backendModule from '#/services/Backend'
@@ -422,6 +422,11 @@ export function RealAssetInternalRow(props: RealAssetRowInternalProps) {
422
422
)
423
423
nodeParentKeysRef . current = { nodeMap : new WeakRef ( nodeMap . current ) , parentKeys }
424
424
}
425
+
426
+ if ( isLocalCategory ( category ) ) {
427
+ return true
428
+ }
429
+
425
430
return payload . every ( ( payloadItem ) => {
426
431
const parentKey = nodeParentKeysRef . current ?. parentKeys . get ( payloadItem . key )
427
432
const parent = parentKey == null ? null : nodeMap . current . get ( parentKey )
@@ -440,6 +445,7 @@ export function RealAssetInternalRow(props: RealAssetRowInternalProps) {
440
445
} )
441
446
}
442
447
} ) ( )
448
+
443
449
if ( ( isPayloadMatch && canPaste ) || event . dataTransfer . types . includes ( 'Files' ) ) {
444
450
event . preventDefault ( )
445
451
if ( asset . type === backendModule . AssetType . directory && state . category . type !== 'trash' ) {
You can’t perform that action at this time.
0 commit comments