fix(chat): node online status race, WELCOME peer_needed off-by-one, JOIN missing proto byte
- node_put/node_update_verified: set online=1 on INSERT (nodes created when conn is UP) - channel_peers_all: fix peer_needed calculation (atl byte was missing) - cs_send_channel_join: add proto byte to address serialization matching all parsers
This commit is contained in:
1 parent
38eb51c679
commit
f476188566
18 files changed
+431
-24
No files matched your search
@@ -19,6 +19,13 @@ QRect ChannelDelegate::inviteByLinkButtonRect(const QRect &itemRect) {
|
||||
InviteBtnSize, InviteBtnSize);
|
||||
}
|
||||
|
||||
QRect ChannelDelegate::settingsButtonRect(const QRect &itemRect) {
|
||||
const int margin = 6;
|
||||
return QRect(itemRect.right() - margin - InviteBtnSize * 3 - InviteBtnGap * 2,
|
||||
itemRect.bottom() - margin - InviteBtnSize,
|
||||
InviteBtnSize, InviteBtnSize);
|
||||
}
|
||||
|
||||
void ChannelDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
|
||||
const QModelIndex &index) const {
|
||||
painter->save();
|
||||
@@ -199,6 +206,25 @@ void ChannelDelegate::paint(QPainter *painter, const QStyleOptionViewItem &optio
|
||||
painter->drawLine(cx + dx + 1, cy, cx + dx + 1, cy - 3 + 1);
|
||||
painter->drawLine(cx + dx + 1, cy, cx + dx + 1, cy + 3 - 1);
|
||||
|
||||
/* ── settings gear (left of invite-by-link button) ── */
|
||||
QRect gearRect = settingsButtonRect(option.rect);
|
||||
bool gearHovered = index.data(ChannelSettingsBtnHoveredRole).toInt() != 0;
|
||||
QColor gearColor = gearHovered ? QColor("#3390EC") : QColor("#888");
|
||||
painter->setPen(QPen(gearColor, 2));
|
||||
painter->setBrush(Qt::NoBrush);
|
||||
int gr = 5;
|
||||
painter->drawEllipse(gearRect.center(), gr, gr);
|
||||
painter->drawEllipse(gearRect.center(), gr / 2, gr / 2);
|
||||
int gcx = gearRect.center().x(), gcy = gearRect.center().y();
|
||||
painter->drawLine(gcx, gcy - gr, gcx, gcy - gr + 1);
|
||||
painter->drawLine(gcx, gcy + gr, gcx, gcy + gr - 1);
|
||||
painter->drawLine(gcx - gr, gcy, gcx - gr + 1, gcy);
|
||||
painter->drawLine(gcx + gr, gcy, gcx + gr - 1, gcy);
|
||||
painter->drawLine(gcx - 3, gcy - 4, gcx - 3, gcy - 5);
|
||||
painter->drawLine(gcx + 3, gcy + 4, gcx + 3, gcy + 5);
|
||||
painter->drawLine(gcx - 4, gcy - 3, gcx - 5, gcy - 3);
|
||||
painter->drawLine(gcx + 4, gcy + 3, gcx + 5, gcy + 3);
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user