forked from blue/squawk
fix bug when everything was treated as animation, bug with not working group amount of messages, handled the situation when preview is painted but the file was lost
This commit is contained in:
parent
0d584c5aba
commit
721f6daa36
10 changed files with 62 additions and 8 deletions
|
@ -304,7 +304,7 @@ QVariant Models::MessageFeed::data(const QModelIndex& index, int role) const
|
|||
std::set<QString>::const_iterator umi = unreadMessages->find(item.id);
|
||||
if (umi != unreadMessages->end()) {
|
||||
unreadMessages->erase(umi);
|
||||
emit unreadMessagesCount();
|
||||
emit unreadMessagesCountChanged();
|
||||
}
|
||||
|
||||
item.sentByMe = sentByMe(*msg);
|
||||
|
@ -370,7 +370,6 @@ void Models::MessageFeed::fetchMore(const QModelIndex& parent)
|
|||
if (syncState == incomplete) {
|
||||
syncState = syncing;
|
||||
emit syncStateChange(syncState);
|
||||
emit requestStateChange(true);
|
||||
|
||||
if (storage.size() == 0) {
|
||||
emit requestArchive("");
|
||||
|
@ -398,7 +397,6 @@ void Models::MessageFeed::responseArchive(const std::list<Shared::Message> list,
|
|||
syncState = incomplete;
|
||||
}
|
||||
emit syncStateChange(syncState);
|
||||
emit requestStateChange(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -656,3 +654,13 @@ Models::MessageFeed::SyncState Models::MessageFeed::getSyncState() const
|
|||
{
|
||||
return syncState;
|
||||
}
|
||||
|
||||
void Models::MessageFeed::requestLatestMessages()
|
||||
{
|
||||
if (syncState != syncing) {
|
||||
syncState = syncing;
|
||||
emit syncStateChange(syncState);
|
||||
|
||||
emit requestArchive("");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue