diff --git a/.clang-format b/.clang-format index a84b477..37d4bf7 100644 --- a/.clang-format +++ b/.clang-format @@ -7,7 +7,5 @@ SeparateDefinitionBlocks: Always AllowShortBlocksOnASingleLine: Never AllowShortIfStatementsOnASingleLine: false AllowShortFunctionsOnASingleLine: None +AllowShortLambdasOnASingleLine: Empty AlignAfterOpenBracket: BlockIndent -AlignOperands: AlignAfterOperator -BreakBeforeBinaryOperators: NonAssignment -AllowAllArgumentsOnNextLine: true diff --git a/external/mirai-core/CMakeLists.txt b/external/mirai-core/CMakeLists.txt index d6317c9..6fc217d 100644 --- a/external/mirai-core/CMakeLists.txt +++ b/external/mirai-core/CMakeLists.txt @@ -8,12 +8,14 @@ set(CMAKE_COMPILE_WARNING_AS_ERROR ON) add_library(mirai-core src/Mirai.cpp src/Task.cpp + src/Day.cpp src/Event.cpp src/DateTime.cpp src/EventEmitter.cpp src/Source.cpp src/MarkdownDataProvider.cpp src/MarkdownDataProvider.Parser.cpp + src/View.cpp src/utils.cpp ) diff --git a/external/mirai-core/include/mirai-core/DataProvider.h b/external/mirai-core/include/mirai-core/DataProvider.h index d206f3b..a2798db 100644 --- a/external/mirai-core/include/mirai-core/DataProvider.h +++ b/external/mirai-core/include/mirai-core/DataProvider.h @@ -14,83 +14,103 @@ namespace mirai { -enum task_state { TODO, DONE }; - -struct task_data { - int id; - std::string title; - task_state state; - std::optional due_date; -}; - -struct updatable_task_data { - std::optional title = std::nullopt; - std::optional state = std::nullopt; - std::optional> due_date = std::nullopt; -}; - -struct event_data { +struct DayData { int id; Date date; - std::string title; - Time starts_at; - Time ends_at; }; -struct updatable_event_data { +struct UpdatableDayData { std::optional date; - std::optional title; - std::optional