parent
ffb46fa47a
commit
3a62c6a25b
|
@ -11,6 +11,7 @@
|
||||||
#include "menuHandler.h"
|
#include "menuHandler.h"
|
||||||
#include "listView.h"
|
#include "listView.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
@ -222,6 +223,9 @@ int EventHandler::pointerHandler(const int type, const int par1, const int par2)
|
||||||
if (_loginView->logginClicked(par1, par2) == 2)
|
if (_loginView->logginClicked(par1, par2) == 2)
|
||||||
{
|
{
|
||||||
_menu.drawLoadingScreen();
|
_menu.drawLoadingScreen();
|
||||||
|
|
||||||
|
Log::writeLog("Start Login from loginscreen");
|
||||||
|
|
||||||
//TODO use progressbar and log (check what can go wrong?) catch?
|
//TODO use progressbar and log (check what can go wrong?) catch?
|
||||||
if (_nextcloud.login(_loginView->getURL(), _loginView->getUsername(), _loginView->getPassword()))
|
if (_nextcloud.login(_loginView->getURL(), _loginView->getUsername(), _loginView->getPassword()))
|
||||||
{
|
{
|
||||||
|
@ -230,7 +234,7 @@ int EventHandler::pointerHandler(const int type, const int par1, const int par2)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//redraw login screen so that loading disappears
|
//TODO redraw login screen so that loading disappears
|
||||||
Message(ICON_WARNING, "Warning", "Something went wrong...", 1200);
|
Message(ICON_WARNING, "Warning", "Something went wrong...", 1200);
|
||||||
}
|
}
|
||||||
FullUpdate();
|
FullUpdate();
|
||||||
|
|
|
@ -110,6 +110,8 @@ bool Nextcloud::login(const string &Url, const string &Username, const string &P
|
||||||
string tempPath = NEXTCLOUD_ROOT_PATH + Username + "/";
|
string tempPath = NEXTCLOUD_ROOT_PATH + Username + "/";
|
||||||
if (setItems(getDataStructure(tempPath, Username, Pass)))
|
if (setItems(getDataStructure(tempPath, Username, Pass)))
|
||||||
{
|
{
|
||||||
|
Log::writeLog("Got items");
|
||||||
|
|
||||||
if (iv_access(NEXTCLOUD_CONFIG_PATH.c_str(), W_OK) != 0)
|
if (iv_access(NEXTCLOUD_CONFIG_PATH.c_str(), W_OK) != 0)
|
||||||
iv_buildpath(NEXTCLOUD_CONFIG_PATH.c_str());
|
iv_buildpath(NEXTCLOUD_CONFIG_PATH.c_str());
|
||||||
this->setUsername(Username);
|
this->setUsername(Username);
|
||||||
|
@ -264,6 +266,9 @@ vector<Item> Nextcloud::getDataStructure(const string &pathUrl, const string &Us
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log::writeLog("Starting download of DataStructure");
|
||||||
|
|
||||||
|
|
||||||
string readBuffer;
|
string readBuffer;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
CURL *curl = curl_easy_init();
|
CURL *curl = curl_easy_init();
|
||||||
|
|
Loading…
Reference in New Issue