Qml app avoid multiple default identity creation burst

This commit is contained in:
Gioacchino Mazzurco 2017-04-18 13:05:07 +02:00
parent 2c4cbd529a
commit 943a4213fb

View File

@ -63,6 +63,7 @@ Item
rsApi.request("/identity/*/", "", refreshContactsCallback)
}
property bool _refreshOwnCallback_creating: false
function refreshOwnCallback(par)
{
console.log("contactsView.refreshOwnCallback(par)", visible)
@ -75,8 +76,11 @@ Item
contactsView.own_gxs_id = json.data[0].gxs_id
contactsView.own_nick = json.data[0].name
}
else
else if (!_refreshOwnCallback_creating)
{
console.log("refreshOwnCallback(par)", "creating new identity" )
_refreshOwnCallback_creating = true
var jsonData = { "name": mainWindow.pgp_name, "pgp_linked": false }
rsApi.request(
"/identity/create_identity",