chat gui refactor and first contact sorting

This commit is contained in:
Green Sky
2025-03-21 16:16:02 +01:00
parent c383c4f5a0
commit 1fb590dfc1
4 changed files with 200 additions and 65 deletions

View File

@@ -42,6 +42,10 @@ class ChatGui4 : public ObjectStoreEventI {
SendImagePopup _sip;
ImageViewerPopup _ivp;
// set to true if not hovered
// TODO: add timer?
bool _contact_list_sortable {false};
// TODO: refactor this to allow multiple open contacts
std::optional<Contact4> _selected_contact;
@@ -77,6 +81,9 @@ class ChatGui4 : public ObjectStoreEventI {
float render(float time_delta, bool window_hidden, bool window_focused);
public:
void sendFilePath(Contact4 c, std::string_view file_path);
void sendFileList(Contact4 c, const std::vector<std::string_view>& list);
void sendFilePath(std::string_view file_path);
void sendFileList(const std::vector<std::string_view>& list);