2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Add create poll box from groups three-dot menu.

This commit is contained in:
John Preston
2018-12-20 20:02:44 +04:00
parent 74c1db740d
commit b6f7832745
15 changed files with 752 additions and 52 deletions

View File

@@ -234,8 +234,8 @@ void ForceFullRepaint(not_null<QWidget*> widget) {
}
void PostponeCall(FnMut<void()> &&callable) {
const auto app = static_cast<Application*>(qApp);
app->postponeCall(std::move(callable));
const auto application = static_cast<Application*>(qApp);
application->postponeCall(std::move(callable));
}
} // namespace Ui

View File

@@ -2160,7 +2160,11 @@ void InputField::handleContentsChanged() {
if (tagsChanged || (_lastTextWithTags.text != currentText)) {
_lastTextWithTags.text = currentText;
const auto weak = make_weak(this);
emit changed();
if (!weak) {
return;
}
checkContentHeight();
}
startPlaceholderAnimation();

View File

@@ -15,6 +15,10 @@ class VerticalLayout : public RpWidget {
public:
using RpWidget::RpWidget;
int count() const {
return _rows.size();
}
template <
typename Widget,
typename = std::enable_if_t<
@@ -36,7 +40,7 @@ public:
Widget *add(
object_ptr<Widget> &&child,
const style::margins &margin = style::margins()) {
return insert(_rows.size(), std::move(child), margin);
return insert(count(), std::move(child), margin);
}
QMargins getMargins() const override;