28 lines
461 B
C
28 lines
461 B
C
|
#pragma once
|
||
|
|
||
|
#include <cstdint>
|
||
|
#include <vector>
|
||
|
|
||
|
#include "slimchat.h"
|
||
|
#include "view.h"
|
||
|
|
||
|
class ViewChatList : public View {
|
||
|
public:
|
||
|
ViewChatList(TgTUI& tgtui);
|
||
|
|
||
|
virtual void open() override;
|
||
|
virtual void close() override;
|
||
|
|
||
|
virtual void paint() override;
|
||
|
|
||
|
virtual bool keyIn(int key) override;
|
||
|
|
||
|
int64_t getSelectedChatId();
|
||
|
|
||
|
private:
|
||
|
std::vector<SlimChat> chats;
|
||
|
int32_t currentChatOffset = 0;
|
||
|
int32_t selectedChatRow = 0;
|
||
|
|
||
|
int maxRows, maxCols;
|
||
|
};
|