mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Update a usernames "timeAdded" every time it tries to be added
This keeps "recent chatters" from expiring Progress on #57
This commit is contained in:
parent
5a88f084a3
commit
57e0e85d77
|
@ -105,6 +105,8 @@ void CompletionModel::addUser(const QString &str)
|
|||
this->emotes.erase(p.first);
|
||||
auto result2 = this->emotes.insert(ts);
|
||||
assert(result2.second);
|
||||
} else {
|
||||
p.first->timeAdded = std::chrono::steady_clock::now();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ class CompletionModel : public QAbstractListModel
|
|||
// Type will help decide the lifetime of the tagged strings
|
||||
Type type;
|
||||
|
||||
std::chrono::steady_clock::time_point timeAdded;
|
||||
mutable std::chrono::steady_clock::time_point timeAdded;
|
||||
|
||||
bool HasExpired(const std::chrono::steady_clock::time_point &now) const
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue