From 5f74756a0051bb0d574c7863316f1c81f6147a95 Mon Sep 17 00:00:00 2001 From: marlon-erler Date: Mon, 22 Jul 2024 15:07:31 +0200 Subject: [PATCH] cleanup --- src/Model/Files/taskModel.ts | 14 +++++++++----- src/ViewModel/chatListViewModel.ts | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Model/Files/taskModel.ts b/src/Model/Files/taskModel.ts index b6af31a6..c216f137 100644 --- a/src/Model/Files/taskModel.ts +++ b/src/Model/Files/taskModel.ts @@ -139,12 +139,16 @@ export default class TaskModel { return taskFileContentOrNull; }; - moveTask = (taskFileId: string, oldBoardId: string, newBoardId: string): boolean => { + moveTask = ( + taskFileId: string, + oldBoardId: string, + newBoardId: string + ): void => { const sourcePath: string[] = this.getTaskPath(oldBoardId, taskFileId); const destinationPath: string[] = this.getTaskPath(newBoardId, taskFileId); - return this.storageModel.rename(sourcePath, destinationPath); - } - + this.storageModel.renameRecursively(sourcePath, destinationPath); + }; + // init constructor( storageModel: StorageModel, @@ -234,4 +238,4 @@ export const TaskFileContentReference: TaskFileContent = { name: "", boardId: "", -}; \ No newline at end of file +}; diff --git a/src/ViewModel/chatListViewModel.ts b/src/ViewModel/chatListViewModel.ts index 9b3d48a9..0dd6e831 100644 --- a/src/ViewModel/chatListViewModel.ts +++ b/src/ViewModel/chatListViewModel.ts @@ -1,7 +1,7 @@ import * as React from "bloatless-react"; import ChatListModel from "../Model/Chat/chatListModel"; -import ChatModel from "../Model/chatModel"; +import ChatModel from "../Model/Chat/chatModel"; import ChatViewModel from "./chatViewModel"; import SettingsViewModel from "./settingsViewModel"; import StorageModel from "../Model/Global/storageModel";