diff --git a/gui/action.cpp b/gui/action.cpp
index e0811185..aac2c313 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -1026,7 +1026,14 @@ int GUIAction::flash(std::string arg)
reinject_after_flash();
PartitionManager.Update_System_Details();
+ if (DataManager::GetIntValue("tw_install_reboot") > 0 && ret_val == 0) {
+ gui_msg("install_reboot=Rebooting in 5 seconds");
+ usleep(5000000);
+ TWFunc::tw_reboot(rb_system);
+ usleep(5000000); // another sleep while we wait for the reboot to occur
+ }
operation_end(ret_val);
+ // This needs to be after the operation_end call so we change pages before we change variables that we display on the screen
DataManager::SetValue(TW_ZIP_QUEUE_COUNT, zip_queue_index);
return 0;
}
diff --git a/gui/devices/common/res/languages/en.xml b/gui/devices/common/res/languages/en.xml
index f7a7b77e..8ce47625 100644
--- a/gui/devices/common/res/languages/en.xml
+++ b/gui/devices/common/res/languages/en.xml
@@ -226,5 +226,6 @@
Cancelling ADB sideload...Error changing file system.Custom theme version does not match TWRP version. Using stock theme.
+ Rebooting in 5 seconds
diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml
index ba96e418..525a2c1d 100644
--- a/gui/theme/common/landscape.xml
+++ b/gui/theme/common/landscape.xml
@@ -440,6 +440,12 @@
+
+
+ {@install_reboot_chk=Reboot after installation is complete}
+
+
+