Add an option to one click flash current booted TWRP ramdisk
Change-Id: I12303696698a5feaa43401bcac9e30d5b3b99a0c
diff --git a/gui/theme/common/portrait.xml b/gui/theme/common/portrait.xml
index 6c6ce47..125effe 100755
--- a/gui/theme/common/portrait.xml
+++ b/gui/theme/common/portrait.xml
@@ -412,6 +412,13 @@
<listitem name="{@skip_digest_zip_chk=Skip Digest check before installing zip}">
<data variable="tw_skip_digest_check_zip"/>
</listitem>
+ <listitem name="{@auto_reflashtwrp_chk=Automatically Reflash TWRP after flashing a ROM}">
+ <conditions>
+ <condition var1="tw_has_boot_slots" var2="1"/>
+ <condition var1="tw_has_repack_tools" var2="1"/>
+ </conditions>
+ <data variable="tw_auto_reflashtwrp"/>
+ </listitem>
<listitem name="{@install_reboot_chk=Reboot after installation is complete}">
<data variable="tw_install_reboot"/>
</listitem>
@@ -3257,6 +3264,13 @@
<listitem name="{@unmount_sys_install=Unmount System before installing a ZIP}">
<data variable="tw_unmount_system"/>
</listitem>
+ <listitem name="{@auto_reflashtwrp_chk=Automatically Reflash TWRP after flashing a ROM}">
+ <conditions>
+ <condition var1="tw_has_boot_slots" var2="1"/>
+ <condition var1="tw_has_repack_tools" var2="1"/>
+ </conditions>
+ <data variable="tw_auto_reflashtwrp"/>
+ </listitem>
</listbox>
<button style="main_button_half_height">
@@ -3690,6 +3704,22 @@
<action function="page">repackselect</action>
</actions>
</listitem>
+ <listitem name="{@reflash_twrp=Flash Current TWRP}">
+ <conditions>
+ <condition var1="tw_has_boot_slots" var2="1"/>
+ <condition var1="tw_has_repack_tools" var2="1"/>
+ </conditions>
+ <actions>
+ <action function="set">tw_repack_kernel=0</action>
+ <action function="set">tw_back=advanced</action>
+ <action function="set">tw_action=reflashtwrp</action>
+ <action function="set">tw_text1={@reflash_twrp_confirm=Flash Current TWRP?}</action>
+ <action function="set">tw_action_text1={@reflashing_twrp=Flashing TWRP...}</action>
+ <action function="set">tw_complete_text1={@reflash_twrp_complete=Done Flashing TWRP}</action>
+ <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action>
+ <action function="page">confirm_action</action>
+ </actions>
+ </listitem>
<listitem name="{@install_kernel=Install Kernel}">
<conditions>
<condition var1="tw_has_boot_slots" var2="1"/>