Skip to content
Repos

DevPlaceApp

C++ 1.0 KB30 lines Opens in site

Directory Raw Download

#pragma once
// Spec: FR-CLI-02 (screen id compose-lab), INV-social 9, 10, 19. Harness screen wiring the shared compose components
// the way the comment editor does: a long press popover on a quoted text, an editor with mention suggestions above it
// and the emoji picker button. Also the reference for consumers of DevPlaceTextEditor and MentionSuggestions.
#include <memory>
#include <string>

#include "screens/components/MentionSuggestions.hpp"
#include "ui/Navigation.hpp"
#include "ui/TextInput.hpp"

namespace dp {

class ComposeLabScreen : public ui::Screen {
 public:
  ComposeLabScreen();
  ui::ViewPtr body() override;
  std::string title() const override;
  TitleMode titleMode() const override { return TitleMode::Inline; }
  const std::string& draft() const { return draft_; }

 private:
  std::string draft_;
  std::optional<int> caret_;
  MentionSuggestions mentions_;
  std::vector<UserSearch::Result> participants_;
  std::shared_ptr<ui::TextInputHandle> handle_ = std::make_shared<ui::TextInputHandle>();
};

}  // namespace dp
52.0ms