Improve Contacts: sorting, searching and unread

ChatHandler::handleUnreadMsgs(...) deprecate 'id' field
  in favour of 'chat_id'
IdentityHandler::handleWildcard(...) reduce sleep time from 500 to 50 ms
IdentityHandler::handleWildcard(...) expose 'is_contact' to JSON API
Split contacts list delegate into GxsIdentityDelegate.qml
Update to QtQuick.Controls 2.0 because 1.4 is not supported anymore and
  2.1 is not available yet in Qt 5.7.1
ChatView.qml mark messages as read
Set refreshTimer.triggeredOnStart=true to improve reponsiveness of views
Contacts.qml use a Popup that is available in Controls 2.0 instead of a
  castrated Dialog to display full fingerprint
TrustedNodesView.qml check if locations[*].is_online is an array before
  attempting calling reduce
main.qml added menuentry to shutdown de core
main.qml added menuantry to search contact
This commit is contained in:
Gioacchino Mazzurco 2017-03-24 12:02:13 +01:00
parent 34dc1fac37
commit abe84a4f81
17 changed files with 409 additions and 141 deletions

View file

@ -61,7 +61,9 @@ protected:
{
case BEGIN:{
RsIdentityParameters params;
req.mStream << makeKeyValueReference("name", params.nickname) << makeKeyValueReference("pgp_linked", params.isPgpLinked);
req.mStream
<< makeKeyValueReference("name", params.nickname)
<< makeKeyValueReference("pgp_linked", params.isPgpLinked);
if(params.nickname == "")
{
@ -141,9 +143,9 @@ void IdentityHandler::handleWildcard(Request & /*req*/, Response &resp)
)
{
#ifdef WINDOWS_SYS
Sleep(500);
Sleep(50);
#else
usleep(500*1000);
usleep(50*1000);
#endif
}
@ -156,14 +158,18 @@ void IdentityHandler::handleWildcard(Request & /*req*/, Response &resp)
RsGxsIdGroup& grp = *vit;
//electron: not very happy about this, i think the flags should stay hidden in rsidentities
bool own = (grp.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN);
bool pgp_linked = (grp.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_kept_for_compatibility ) ;
resp.mDataStream.getStreamToMember()
<< makeKeyValueReference("id", grp.mMeta.mGroupId) /// @deprecated using "id" as key can cause problems in some JS based languages like Qml @see gxs_id instead
bool pgp_linked = (grp.mMeta.mGroupFlags &
RSGXSID_GROUPFLAG_REALID_kept_for_compatibility);
resp.mDataStream.getStreamToMember()
#warning @deprecated using "id" as key can cause problems in some JS based \
languages like Qml @see gxs_id instead
<< makeKeyValueReference("id", grp.mMeta.mGroupId)
<< makeKeyValueReference("gxs_id", grp.mMeta.mGroupId)
<< makeKeyValueReference("pgp_id",grp.mPgpId )
<< makeKeyValueReference("name", grp.mMeta.mGroupName)
<< makeKeyValueReference("own", own)
<< makeKeyValueReference("pgp_linked", pgp_linked);
<< makeKeyValueReference("pgp_linked", pgp_linked)
<< makeKeyValueReference("is_contact", grp.mIsAContact);
}
}
else ok = false;