Exemplo n.º 1
0
void NewGroupInner::chooseParticipant() {
	int32 rh = st::profileListPhotoSize + st::profileListPadding.height() * 2, from;
	if (_filter.isEmpty()) {
		if (!_sel) return;
		changeCheckState(_sel);
	} else {
		if (_filteredSel < 0 || _filteredSel >= _filtered.size()) return;

		DialogRow *row = _filtered[_filteredSel];
		changeCheckState(row);

		PeerData *peer = row->history->peer;
		emit selectAllQuery();
	}

	parentWidget()->update();
}
Exemplo n.º 2
0
void PeerListContent::addRowEntry(not_null<PeerListRow*> row) {
	if (_controller->respectSavedMessagesChat() && row->peer()->isSelf()) {
		row->setIsSavedMessagesChat(true);
	}
	_rowsById.emplace(row->id(), row);
	_rowsByPeer[row->peer()].push_back(row);
	if (addingToSearchIndex()) {
		addToSearchIndex(row);
	}
	if (_controller->isRowSelected(row->peer())) {
		Assert(row->id() == row->peer()->id);
		changeCheckState(row, true, PeerListRow::SetStyle::Fast);
	}
}