FIX - allow apps to move across the dock

This commit is contained in:
Eichenholz
2026-08-07 09:15:20 +02:00
parent e2ae3fe412
commit 3e2f2f72b3
6 changed files with 91 additions and 44 deletions
+2 -1
View File
@@ -76,7 +76,8 @@ describe('app store', () => {
const apps = useAppStoreStore()
apps.hydrate(null)
apps.moveHomeApp('mail', 'grid', 'grid', 0)
const mailIndex = apps.homeLayout.grid.indexOf('mail')
apps.moveHomeApp('grid', mailIndex, 'grid', 0)
expect(apps.homeLayout.grid[0]).toBe('mail')
apps.removeHomeApp('mail')
+2 -2
View File
@@ -94,15 +94,15 @@ export const useAppStoreStore = defineStore('app-store', {
this.persist()
},
moveHomeApp(
appId: LaunchablePhoneAppId,
from: HomeArea,
sourceIndex: number,
to: HomeArea,
targetIndex: number,
): void {
this.homeLayout = moveHomeApp(
this.homeLayout,
appId,
from,
sourceIndex,
to,
targetIndex,
)