Also deliver the encrypted status via the ClientEncryption signal
authorKevin Ottens <kevin.ottens@nextcloud.com>
Thu, 2 Jul 2020 14:37:01 +0000 (16:37 +0200)
committerKevin Ottens (Rebase PR Action) <er-vin@users.noreply.github.com>
Mon, 6 Jul 2020 05:27:14 +0000 (05:27 +0000)
This will turn useful for other consumers of that data. The alternative
would be to expose a method breaking all form of encapsulation.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
src/libsync/clientsideencryption.cpp
src/libsync/clientsideencryption.h

index 45b356b1ebc7a8888b2ff4350ebe6f2abbb57298..78874a92cb29a8fd68d4ca8ed8b85ad24c02fcaa 100644 (file)
@@ -1228,14 +1228,14 @@ void ClientSideEncryption::folderEncryptedStatusFetched(const QHash<QString, boo
     _refreshingEncryptionStatus = false;
     _folder2encryptedStatus = result;
     qCDebug(lcCse) << "Retrieved correctly the encrypted status of the folders." << result;
-    emit folderEncryptedStatusFetchDone();
+    emit folderEncryptedStatusFetchDone(result);
 }
 
 void ClientSideEncryption::folderEncryptedStatusError(int error)
 {
     _refreshingEncryptionStatus = false;
     qCDebug(lcCse) << "Failed to retrieve the status of the folders." << error;
-    emit folderEncryptedStatusFetchDone();
+    emit folderEncryptedStatusFetchDone({});
 }
 
 FolderMetadata::FolderMetadata(AccountPtr account, const QByteArray& metadata, int statusCode) : _account(account)
index 17f48348d513d68da97a1bf046f02ff4906e2451..d2779c2e571acc52f4b9557b933405281320c92e 100644 (file)
@@ -105,7 +105,7 @@ signals:
     void initializationFinished();
     void mnemonicGenerated(const QString& mnemonic);
     void showMnemonic(const QString& mnemonic);
-    void folderEncryptedStatusFetchDone();
+    void folderEncryptedStatusFetchDone(const QHash<QString, bool> &values);
 
 private:
     void getPrivateKeyFromServer();