PubSub system (#346)
* Add websocketpp dependency * Initial pubsub commit Renamed selection min and max variables to selectionMin and selectionMax to bypass windows min/max macros being stupid. TwitchAccount is now initialized with its User ID. It cannot be changed after it has been initialized. * Update openssl folder * Update installation instructions * Split up websocketpp dependency to its own code only and openssl.pri * Add missing include to asio steady_timer * Update dependencies for linux
This commit is contained in:
@@ -279,11 +279,13 @@ QString ChannelView::getSelectedText()
|
||||
}
|
||||
|
||||
qDebug() << "xd >>>>";
|
||||
for (int msg = selection.min.messageIndex; msg <= selection.max.messageIndex; msg++) {
|
||||
for (int msg = selection.selectionMin.messageIndex; msg <= selection.selectionMax.messageIndex;
|
||||
msg++) {
|
||||
MessageLayoutPtr layout = messagesSnapshot[msg];
|
||||
int from = msg == selection.min.messageIndex ? selection.min.charIndex : 0;
|
||||
int to = msg == selection.max.messageIndex ? selection.max.charIndex
|
||||
: layout->getLastCharacterIndex() + 1;
|
||||
int from =
|
||||
msg == selection.selectionMin.messageIndex ? selection.selectionMin.charIndex : 0;
|
||||
int to = msg == selection.selectionMax.messageIndex ? selection.selectionMax.charIndex
|
||||
: layout->getLastCharacterIndex() + 1;
|
||||
|
||||
qDebug() << "from:" << from << ", to:" << to;
|
||||
|
||||
@@ -405,8 +407,8 @@ void ChannelView::setChannel(ChannelPtr newChannel)
|
||||
// on message removed
|
||||
this->messageRemovedConnection =
|
||||
newChannel->messageRemovedFromStart.connect([this](MessagePtr &) {
|
||||
this->selection.min.messageIndex--;
|
||||
this->selection.max.messageIndex--;
|
||||
this->selection.selectionMin.messageIndex--;
|
||||
this->selection.selectionMax.messageIndex--;
|
||||
this->selection.start.messageIndex--;
|
||||
this->selection.end.messageIndex--;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user