gui: permanence of custom theme after changing TWRP folder
After changing the TWRP folder the custom theme was not being found because it was set in the code to the folder "TWRP/theme..."
This patch aims to fix that.
Signed-off-by: Fernando Oliveira <fernandoaju78@gmail.com>
Change-Id: I41e6e1378c74c9ee579b7b23beb37e0c2cd8761a
(cherry picked from commit ddaccbe7d411e707307ce0a9c95a36571be38ad7)
diff --git a/gui/gui.cpp b/gui/gui.cpp
index 00aab7f..5c7d27e 100755
--- a/gui/gui.cpp
+++ b/gui/gui.cpp
@@ -816,7 +816,7 @@
}
}
- theme_path += "/TWRP/theme/ui.zip";
+ theme_path += TWFunc::Check_For_TwrpFolder() + "/theme/ui.zip";
if (check || PageManager::LoadPackage("TWRP", theme_path, "main"))
{
#endif // ifndef TW_OEM_BUILD
@@ -850,7 +850,7 @@
}
std::string theme_path = DataManager::GetSettingsStoragePath();
- theme_path += "/TWRP/theme/ui.zip";
+ theme_path += TWFunc::Check_For_TwrpFolder() + "/theme/ui.zip";
// Check for a custom theme
if (TWFunc::Path_Exists(theme_path)) {
// There is a custom theme, try to load it