Example #1
0
File: tabs.cpp Project: vogel/kadu
bool TabsManager::acceptChat(Chat chat) const
{
    if (!chat)
        return false;

    if (chat.property("tabs:tmp-attached", false).toBool())
        return true;
    if (chat.property("tabs:tmp-detached", false).toBool())
        return false;
    if (chat.property("tabs:attached", false).toBool())
        return true;
    if (chat.property("tabs:detached", false).toBool())
        return false;

    return ConfigDefaultTabs;
}
Example #2
0
bool RecentChatService::isRecent(Chat chat) const
{
    if (!chat.hasProperty(LAST_MESSAGE_DATE_TIME_PROPERTY))
        return false;

    auto dateTime = chat.property(LAST_MESSAGE_DATE_TIME_PROPERTY, QDateTime{}).toDateTime();
    return isRecent(dateTime);
}