mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2024-10-01 01:06:10 -04:00
Send optout for real and only once.
This commit is contained in:
parent
8fe60c29fb
commit
8aed93daa5
@ -178,7 +178,7 @@ void Network::sendOptOut()
|
||||
|
||||
QJsonDocument doc;
|
||||
doc.setArray(array);
|
||||
sendMixpanel(doc.toJson());
|
||||
sendMixpanel(doc.toJson(), true /*isOptOut*/);
|
||||
|
||||
#if defined(DEBUG)
|
||||
printf("%s %s\n", qPrintable("opt_out"), qPrintable(doc.toJson(QJsonDocument::Indented)));
|
||||
@ -272,9 +272,9 @@ void Network::sendIpify()
|
||||
connect(reply, &QNetworkReply::finished, this, &Network::handleIpifyFinished);
|
||||
}
|
||||
|
||||
void Network::sendMixpanel(const QByteArray &json)
|
||||
void Network::sendMixpanel(const QByteArray &json, bool isOptOut)
|
||||
{
|
||||
if (!m_usageStatsActive)
|
||||
if (!m_usageStatsActive && !isOptOut)
|
||||
return;
|
||||
|
||||
QUrl trackUrl("https://api.mixpanel.com/track");
|
||||
|
@ -47,7 +47,7 @@ private:
|
||||
void sendHealth();
|
||||
void sendIpify();
|
||||
void sendMixpanelEvent(const QString &event);
|
||||
void sendMixpanel(const QByteArray &json);
|
||||
void sendMixpanel(const QByteArray &json, bool isOptOut = false);
|
||||
bool packageAndSendJson(const QString &ingestId, const QString &json);
|
||||
|
||||
private:
|
||||
|
@ -21,14 +21,6 @@ Dialog {
|
||||
id: theme
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: startupDialog
|
||||
function onClosed() {
|
||||
if (!Network.usageStatsActive)
|
||||
Network.usageStatsActive = false // opt-out triggered
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
id: column
|
||||
spacing: 20
|
||||
|
Loading…
Reference in New Issue
Block a user