2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

forward/delete for channels, prepared load unread by offset_id, not done yet!

This commit is contained in:
John Preston
2015-09-07 10:52:37 +03:00
parent b53e35e046
commit 54d5b6dd71
14 changed files with 205 additions and 107 deletions

View File

@@ -192,6 +192,18 @@ public:
void focusInEvent(QFocusEvent *e);
void setMaxHeight(int32 maxHeight);
bool hasSendText() const;
static bool replaceCharBySpace(ushort code) {
// \xe2\x80[\xa8 - \xac\xad] // 8232 - 8237
// QString from1 = QString::fromUtf8("\xe2\x80\xa8"), to1 = QString::fromUtf8("\xe2\x80\xad");
// \xcc[\xb3\xbf\x8a] // 819, 831, 778
// QString bad1 = QString::fromUtf8("\xcc\xb3"), bad2 = QString::fromUtf8("\xcc\xbf"), bad3 = QString::fromUtf8("\xcc\x8a");
// [\x00\x01\x02\x07\x08\x0b-\x1f] // '\t' = 0x09
return (code >= 0x00 && code <= 0x02) || (code >= 0x07 && code <= 0x09) || (code >= 0x0b && code <= 0x1f) ||
(code == 819) || (code == 831) || (code == 778) || (code >= 8232 && code <= 8237);
}
public slots:
void onChange();
@@ -624,8 +636,12 @@ private:
void updateDragAreas();
bool canSendMessages(PeerData *peer);
bool readyToForward();
PeerData *_peer;
ChannelId _channel;
bool _canSendMessages;
MsgId _showAtMsgId;
mtpRequestId _firstLoadRequest, _preloadRequest, _preloadDownRequest;