Skip to content

Commit 93e0c71

Browse files
committed
Remove old promotion manager
1 parent c97f4cc commit 93e0c71

File tree

3 files changed

+5
-25
lines changed

3 files changed

+5
-25
lines changed

src/core/OSTreeTUI.cpp

+1-20
Original file line numberDiff line numberDiff line change
@@ -100,27 +100,8 @@ int OSTreeTUI::main(const std::string& repo, const std::vector<std::string>& sta
100100
return filterManager.branchBoxRender();
101101
});
102102

103-
// promotion
104-
ContentPromotionManager promotionManager(showTooltips);
105-
promotionManager.setBranchRadiobox(Radiobox(&allBranches, &promotionManager.selectedBranch));
106-
promotionManager.setApplyButton(Button(" Apply ", [&] {
107-
ostreeRepo.promoteCommit(visibleCommitViewMap.at(selectedCommit),
108-
ostreeRepo.getBranches().at(static_cast<size_t>(promotionManager.selectedBranch)),
109-
{}, promotionManager.newSubject,
110-
true);
111-
//refresh_repository();
112-
notificationText = " Applied content promotion. ";
113-
}, ButtonOption::Simple()));
114-
Component promotionView = Renderer(promotionManager.composePromotionComponent(), [&] {
115-
if (visibleCommitViewMap.size() <= 0) {
116-
return text(" please select a commit to continue commit-promotion... ") | color(Color::RedLight) | bold | center;
117-
}
118-
return promotionManager.renderPromotionView(ostreeRepo, screen.dimy(),
119-
ostreeRepo.getCommitList().at(visibleCommitViewMap.at(selectedCommit)));
120-
});
121-
122103
// interchangeable view (composed)
123-
Manager manager(infoView, filterView, promotionView);
104+
Manager manager(infoView, filterView);
124105
Component managerRenderer = manager.managerRenderer;
125106

126107
// FOOTER

src/core/manager.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@
1212

1313
// Manager
1414

15-
Manager::Manager(const ftxui::Component& infoView, const ftxui::Component& filterView, const ftxui::Component& promotionView) {
15+
Manager::Manager(const ftxui::Component& infoView, const ftxui::Component& filterView) {
1616
using namespace ftxui;
1717

1818
tabSelection = Menu(&tab_entries, &tab_index, MenuOption::HorizontalAnimated());
1919

2020
tabContent = Container::Tab({
2121
infoView,
22-
filterView,
23-
promotionView
22+
filterView
2423
},
2524
&tab_index);
2625

src/core/manager.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Manager {
1919
int tab_index{0};
2020

2121
std::vector<std::string> tab_entries = {
22-
" Info ", " Filter ", " Promote "
22+
" Info ", " Filter "
2323
};
2424

2525
ftxui::Component tabSelection;
@@ -30,7 +30,7 @@ class Manager {
3030
ftxui::Component managerRenderer;
3131

3232
public:
33-
Manager(const ftxui::Component& infoView, const ftxui::Component& filterView, const ftxui::Component& promotionView);
33+
Manager(const ftxui::Component& infoView, const ftxui::Component& filterView);
3434
};
3535

3636
class CommitInfoManager {

0 commit comments

Comments
 (0)