some warnings fixed, new way of drawing avatars in message line

This commit is contained in:
Blue 2022-01-05 22:29:34 +03:00
parent e27ae1a82f
commit 7130e674c4
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
7 changed files with 65 additions and 16 deletions

View file

@ -97,7 +97,10 @@ void Models::Accounts::addAccount(Account* account)
void Models::Accounts::onAccountChanged(Item* item, int row, int col)
{
if (row < accs.size()) {
if (row < 0) {
return;
}
if (static_cast<std::deque<Models::Account*>::size_type>(row) < accs.size()) {
Account* acc = getAccount(row);
if (item != acc) {
return; //it means the signal is emitted by one of accounts' children, not exactly him, this model has no interest in that