diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt
index c22f43ca7..8839d8bbc 100644
--- a/Telegram/CMakeLists.txt
+++ b/Telegram/CMakeLists.txt
@@ -853,6 +853,8 @@ PRIVATE
support/support_helper.h
support/support_templates.cpp
support/support_templates.h
+ ui/effects/fireworks_animation.cpp
+ ui/effects/fireworks_animation.h
ui/effects/round_checkbox.cpp
ui/effects/round_checkbox.h
ui/effects/send_action_animations.cpp
diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings
index 34a13bc57..7987616af 100644
--- a/Telegram/Resources/langs/lang.strings
+++ b/Telegram/Resources/langs/lang.strings
@@ -2204,6 +2204,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_polls_create_multiple_choice" = "Multiple Answers";
"lng_polls_create_quiz_mode" = "Quiz Mode";
"lng_polls_create_button" = "Create";
+"lng_polls_choose_question" = "Please enter a question.";
+"lng_polls_choose_answers" = "Please enter at least two options.";
+"lng_polls_choose_correct" = "Please choose the correct answer.";
"lng_polls_poll_results_title" = "Poll results";
"lng_polls_quiz_results_title" = "Quiz results";
diff --git a/Telegram/Resources/uwp/AppX/AppxManifest.xml b/Telegram/Resources/uwp/AppX/AppxManifest.xml
index a281d969f..6f4ffc088 100644
--- a/Telegram/Resources/uwp/AppX/AppxManifest.xml
+++ b/Telegram/Resources/uwp/AppX/AppxManifest.xml
@@ -9,7 +9,7 @@
+ Version="1.9.8.0" />
Telegram Desktop
Telegram FZ-LLC
diff --git a/Telegram/SourceFiles/boxes/create_poll_box.cpp b/Telegram/SourceFiles/boxes/create_poll_box.cpp
index 1d9b433bf..4b37d38c6 100644
--- a/Telegram/SourceFiles/boxes/create_poll_box.cpp
+++ b/Telegram/SourceFiles/boxes/create_poll_box.cpp
@@ -48,8 +48,9 @@ public:
not_null session,
bool chooseCorrectEnabled);
+ [[nodiscard]] bool hasOptions() const;
[[nodiscard]] bool isValid() const;
- [[nodiscard]] rpl::producer isValidChanged() const;
+ [[nodiscard]] bool hasCorrect() const;
[[nodiscard]] std::vector toPollAnswers() const;
void focusFirst();
@@ -139,8 +140,10 @@ private:
int _position = 0;
std::vector> _list;
std::vector> _destroyed;
- rpl::variable _valid = false;
rpl::variable _usedCount = 0;
+ bool _hasOptions = false;
+ bool _isValid = false;
+ bool _hasCorrect = false;
rpl::event_stream> _scrollToWidget;
rpl::event_stream<> _backspaceInFront;
@@ -470,12 +473,16 @@ bool Options::full() const {
return (_list.size() == kMaxOptionsCount);
}
-bool Options::isValid() const {
- return _valid.current();
+bool Options::hasOptions() const {
+ return _hasOptions;
}
-rpl::producer Options::isValidChanged() const {
- return _valid.changes();
+bool Options::isValid() const {
+ return _isValid;
+}
+
+bool Options::hasCorrect() const {
+ return _hasCorrect;
}
rpl::producer Options::usedCount() const {
@@ -539,10 +546,10 @@ void Options::enableChooseCorrect(bool enabled) {
_chooseCorrectGroup = enabled
? createChooseCorrectGroup()
: nullptr;
- validateState();
for (auto &option : _list) {
option->enableChooseCorrect(_chooseCorrectGroup);
}
+ validateState();
}
bool Options::correctShadows() const {
@@ -696,10 +703,11 @@ void Options::removeDestroyed(not_null