From af9930482e17f4b55e46707fc017090e4c24a38e Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Thu, 9 Jun 2016 13:49:52 +0600 Subject: CLOUD: Update CloudManager It now supports only one storage of each type. Only one Storage could be loaded to the memory as well. Options' Cloud tab now changes the Storage only when user pressed OK button, giving the ability to look through the Storages without actually changing them. --- backends/cloud/onedrive/onedrivestorage.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'backends/cloud/onedrive') diff --git a/backends/cloud/onedrive/onedrivestorage.cpp b/backends/cloud/onedrive/onedrivestorage.cpp index c391065396..d73bcdbe34 100644 --- a/backends/cloud/onedrive/onedrivestorage.cpp +++ b/backends/cloud/onedrive/onedrivestorage.cpp @@ -115,14 +115,14 @@ void OneDriveStorage::codeFlowComplete(BoolResponse response) { return; } - CloudMan.addStorage(this); ConfMan.removeKey("onedrive_code", "cloud"); + CloudMan.replaceStorage(this, kStorageOneDriveId); + ConfMan.flushToDisk(); debug("Done! You can use OneDrive now! Look:"); CloudMan.syncSaves(); } -void OneDriveStorage::saveConfig(Common::String keyPrefix) { - ConfMan.set(keyPrefix + "type", "OneDrive", "cloud"); +void OneDriveStorage::saveConfig(Common::String keyPrefix) { ConfMan.set(keyPrefix + "access_token", _token, "cloud"); ConfMan.set(keyPrefix + "user_id", _uid, "cloud"); ConfMan.set(keyPrefix + "refresh_token", _refreshToken, "cloud"); -- cgit v1.2.3