2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00
Files
kotatogram-desktop/Telegram/SourceFiles/export/view/export_view_content.h
John Preston 5f01751660 Display errors in export UI.
All errors are now fatal errors :(
2018-06-19 13:35:21 +01:00

42 lines
869 B
C++

/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#include "export/export_controller.h"
namespace Export {
namespace View {
struct Content {
struct Row {
QString id;
QString label;
QString info;
float64 progress = 0.;
};
std::vector<Row> rows;
};
Content ContentFromState(const ProcessingState &state);
inline auto ContentFromState(rpl::producer<State> state) {
return std::move(
state
) | rpl::filter([](const State &state) {
return state.template is<ProcessingState>();
}) | rpl::map([](const State &state) {
return ContentFromState(
state.template get_unchecked<ProcessingState>());
});
}
} // namespace View
} // namespace Export