Open contacts view on click unread notification

This commit is contained in:
Angela Mazzurco 2017-07-31 16:52:03 +02:00
parent 93d778a577
commit c86b7c79ae
3 changed files with 18 additions and 3 deletions

View File

@ -46,7 +46,8 @@ QtObject
qsTr("%1 Unread %2 from %3")
.arg(json.data[0].unread_count)
.arg(json.data[0].unread_count > 1 ? "messages" : "message")
.arg(json.data[0].remote_author_name)
.arg(json.data[0].remote_author_name),
qsTr("/contacts")
)
}
}

View File

@ -65,12 +65,16 @@ public class RetroShareQmlActivity extends QtActivity
@Override
public void onNewIntent(Intent intent)
{
Log.i("RetroShareQmlActivity", "onNewIntent(Intent intent)");
Log.i("RetroShareQmlActivity", "on NewIntent(Intent intent)");
super.onNewIntent(intent);
String uri = intent.getDataString();
if (uri != null) NativeCalls.notifyIntentUri(uri);
if (uri != null)
{
NativeCalls.notifyIntentUri(uri);
Log.i("RetroShareQmlActivity", "onNewIntent(Intent intent) Uri: " + uri);
}
}
@UsedByNativeCode @SuppressWarnings("unused")

View File

@ -41,6 +41,7 @@ ApplicationWindow
{
addUriHandler("/certificate", certificateLinkHandler)
addUriHandler("/identity", contactLinkHandler)
addUriHandler("/contacts", openContactsViewLinkHandler)
var argc = mainArgs.length
for(var i=0; i<argc; ++i)
@ -477,6 +478,15 @@ ApplicationWindow
)
}
}
function openContactsViewLinkHandler (uriStr)
{
if(coreReady)
{
stackView.push("qrc:/Contacts.qml" )
}
}
Popup
{
id: contactImportPopup