0.1.26-alpha release

* refactor: render chat rows from presentation state

* Fix Meshtastic channel sync and add MeshCore CN preset

* Add granular chat notification settings

* Add SD settings backup and restore

* Prepare 0.1.26-alpha release

---------

Co-authored-by: vicliu624 <vicliu@outlook.com>
This commit is contained in:
vicliu authored and GitHub committed 2026-05-19 16:04:42 +08:00
1 parent adf33068d7
commit bf7068b02b
1071 files changed
+78913 -14110

No files matched your search

@@ -0,0 +1,16 @@
#pragma once
#include "chat/delivery/chat_delivery_action_sink.h"
#include "chat/delivery/chat_delivery_action_types.h"
namespace ui_chat_runtime
{
using ChatDeliveryActionRequest =
::chat::delivery::ChatDeliveryActionRequest;
using ChatDeliveryActionResult =
::chat::delivery::ChatDeliveryActionResult;
using IChatDeliveryActionPort =
::chat::delivery::IChatDeliveryActionSink;
} // namespace ui_chat_runtime
@@ -0,0 +1,31 @@
#pragma once
#include "chat/delivery/chat_delivery_types.h"
#include "ui_chat_runtime/chat_delivery_action_port.h"
#include "ui_presentation/chat/chat_message_ref.h"
namespace ui_chat_runtime
{
class ChatDeliveryActionPortAdapter
{
public:
explicit ChatDeliveryActionPortAdapter(
IChatDeliveryActionPort& action_port);
ChatDeliveryActionResult handleMessageAction(
::chat::delivery::ChatDeliveryActionKind kind,
const ::ui::chat::MessageRef& ref);
ChatDeliveryActionResult retryMessage(const ::ui::chat::MessageRef& ref);
ChatDeliveryActionResult cancelPending(const ::ui::chat::MessageRef& ref);
ChatDeliveryActionResult clearFailure(const ::ui::chat::MessageRef& ref);
private:
IChatDeliveryActionPort& action_port_;
};
::chat::delivery::ChatDeliveryRef toDeliveryRef(
const ::ui::chat::MessageRef& ref);
} // namespace ui_chat_runtime
@@ -0,0 +1,11 @@
#pragma once
#include "chat/delivery/chat_delivery_event_port.h"
namespace ui_chat_runtime
{
using ChatDeliveryEvent = ::chat::delivery::ChatDeliveryEvent;
using IChatDeliveryEventPort = ::chat::delivery::IChatDeliveryEventPort;
} // namespace ui_chat_runtime
@@ -0,0 +1,40 @@
#pragma once
#include "chat/delivery/legacy_chat_send_result_mapper.h"
#include "chat/domain/chat_types.h"
#include "ui_chat_runtime/chat_delivery_event_port.h"
namespace chat
{
class ChatService;
}
namespace sys
{
struct ChatSendResultEvent;
}
namespace ui_chat_runtime
{
class ChatDeliveryEventProjectionAdapter
{
public:
ChatDeliveryEventProjectionAdapter(
::chat::ChatService& chat_service,
IChatDeliveryEventPort& delivery_events);
void onChatSendResult(const ::sys::ChatSendResultEvent& event);
void onAckTimeout(::chat::MessageId msg_id, uint32_t timestamp_ms = 0);
private:
bool publishSendResult(::chat::MessageId msg_id,
bool success,
::chat::delivery::LegacyChatSendFailure failure,
uint32_t timestamp_ms);
::chat::ChatService& chat_service_;
IChatDeliveryEventPort& delivery_events_;
};
} // namespace ui_chat_runtime
@@ -0,0 +1,61 @@
#pragma once
#include "chat/domain/chat_types.h"
#include "chat/usecase/chat_service.h"
#include "sys/event_bus.h"
#include "ui/screens/chat/chat_protocol_support.h"
#include "ui_chat_runtime/chat_ui_refresh_sink.h"
#include "ui_presentation/key_verification/key_verification_model.h"
namespace ui_chat_runtime
{
class ChatDeliveryEventProjectionAdapter;
}
namespace ui_key_verification_runtime
{
class KeyVerificationPresentationSource;
}
namespace chat::ui
{
class ChatPageRuntimeEventPump
{
public:
ChatPageRuntimeEventPump(
chat::ChatService& service,
::ui_chat_runtime::ChatDeliveryEventProjectionAdapter*
delivery_adapter,
::ui_key_verification_runtime::KeyVerificationPresentationSource*
key_verification_source,
::ui::key_verification::KeyVerificationModel* key_verification_model,
IChatUiRefreshSink* ui);
void update();
void handleEvent(sys::Event* event);
private:
void handleChatNewMessage(const sys::ChatNewMessageEvent& event);
void handleChatSendResult(const sys::ChatSendResultEvent& event);
void handleUnreadChanged();
void handleKeyVerificationNumberRequest(
const sys::KeyVerificationNumberRequestEvent& event);
void handleKeyVerificationNumberInform(
const sys::KeyVerificationNumberInformEvent& event);
void handleKeyVerificationFinal(const sys::KeyVerificationFinalEvent& event);
void showKeyVerificationForPeer(chat::MeshProtocol protocol,
uint32_t peer_id);
chat::ChatService& service_;
::ui_chat_runtime::ChatDeliveryEventProjectionAdapter*
delivery_adapter_ = nullptr;
::ui_key_verification_runtime::KeyVerificationPresentationSource*
key_verification_source_ = nullptr;
::ui::key_verification::KeyVerificationModel* key_verification_model_ =
nullptr;
IChatUiRefreshSink* ui_ = nullptr;
};
} // namespace chat::ui
@@ -0,0 +1,22 @@
#pragma once
#include "chat/domain/chat_types.h"
#include "ui_presentation/key_verification/key_verification_snapshot.h"
namespace chat::ui
{
class IChatUiRefreshSink
{
public:
virtual ~IChatUiRefreshSink() = default;
virtual void onRuntimeMessageArrived(chat::MessageId msg_id) = 0;
virtual void onRuntimeSendResult(chat::MessageId msg_id) = 0;
virtual void onRuntimeUnreadChanged() = 0;
virtual void showKeyVerification(
const ::ui::key_verification::KeyVerificationSnapshot& snapshot) = 0;
};
} // namespace chat::ui