twrpRepacker: override slot back after flashing

and move updating partition details to the function

Change-Id: I6f27ab1191246b6a23e625b0e3459db9024691c7
(cherry picked from commit 0fc1ee2c1ab1775ac5f5115842b4aaea15ec9ad6)
diff --git a/twrpRepacker.cpp b/twrpRepacker.cpp
index b9f8597..5a59fc6 100755
--- a/twrpRepacker.cpp
+++ b/twrpRepacker.cpp
@@ -260,6 +260,11 @@
 	}}
 	TWFunc::removeDir(REPACK_NEW_DIR, false);
 	gui_msg(Msg(msg::kWarning, "repack_overwrite_warning=If device was previously rooted, then root has been overwritten and will need to be reinstalled."));
+	string Current_Slot = PartitionManager.Get_Active_Slot_Display();
+		if (Current_Slot == "A")
+			PartitionManager.Override_Active_Slot("B");
+		else
+			PartitionManager.Override_Active_Slot("A");
 	return true;
 }