diff --git a/gui/action.cpp b/gui/action.cpp index 464ed278..96727518 100755 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -245,6 +245,7 @@ GUIAction::GUIAction(xml_node<>* node) #ifndef TW_EXCLUDE_NANO ADD_ACTION(editfile); #endif + ADD_ACTION(mergesnapshots); } // First, get the action @@ -2351,3 +2352,12 @@ int GUIAction::applycustomtwrpfolder(string arg __unused) operation_end((int)!ret); return 0; } + +int GUIAction::mergesnapshots(string arg __unused) { + int op_status = 1; + if (PartitionManager.Check_Pending_Merges()) { + op_status = 0; + } + operation_end(op_status); + return 0; +} \ No newline at end of file diff --git a/gui/objects.hpp b/gui/objects.hpp index 098c4805..ae1eeff9 100755 --- a/gui/objects.hpp +++ b/gui/objects.hpp @@ -378,6 +378,7 @@ protected: int enablefastboot(std::string arg); int changeterminal(std::string arg); int applycustomtwrpfolder(std::string arg); + int mergesnapshots(std::string arg); #ifndef TW_EXCLUDE_NANO int editfile(std::string arg); #endif diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml index 81328110..bb78085a 100755 --- a/gui/theme/common/landscape.xml +++ b/gui/theme/common/landscape.xml @@ -3813,6 +3813,17 @@ confirm_action + + + tw_back=advanced + tw_action=mergesnapshots + tw_text1={@merge_snapshots_confirm=Merge Snapshots?} + tw_action_text1={@merging_snapshots=Merging Snapshots...} + tw_complete_text1={@merging_snapshots_complete=Merged Snapshots} + tw_slider_text={@swipe_to_confirm=Swipe to Confirm} + confirm_action + + diff --git a/gui/theme/common/languages/en.xml b/gui/theme/common/languages/en.xml index a33570d3..3b611530 100755 --- a/gui/theme/common/languages/en.xml +++ b/gui/theme/common/languages/en.xml @@ -777,5 +777,9 @@ Unmapping Super Devices... Unmapped all Super Devices Devices on super may not mount until rebooting recovery. + Merge Snapshots + Merge Snapshots? + Merging Snapshots... + Merged Snapshots diff --git a/gui/theme/common/portrait.xml b/gui/theme/common/portrait.xml index 9d7e72c0..b1cca6f0 100755 --- a/gui/theme/common/portrait.xml +++ b/gui/theme/common/portrait.xml @@ -3935,6 +3935,17 @@ confirm_action + + + tw_back=advanced + tw_action=mergesnapshots + tw_text1={@merge_snapshots_confirm=Merge Snapshots?} + tw_action_text1={@merging_snapshots=Merging Snapshots...} + tw_complete_text1={@merging_snapshots_complete=Merged Snapshots} + tw_slider_text={@swipe_to_confirm=Swipe to Confirm} + confirm_action + + diff --git a/gui/theme/common/watch.xml b/gui/theme/common/watch.xml index 84dd4f66..46664909 100755 --- a/gui/theme/common/watch.xml +++ b/gui/theme/common/watch.xml @@ -4414,6 +4414,17 @@ confirm_action + + + tw_back=advanced + tw_action=mergesnapshots + tw_text1={@merge_snapshots_confirm=Merge Snapshots?} + tw_action_text1={@merging_snapshots=Merging Snapshots...} + tw_complete_text1={@merging_snapshots_complete=Merged Snapshots} + tw_slider_text={@swipe_to_confirm=Swipe to Confirm} + confirm_action + +