mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Skip refocus InputField::Inner if field unfocused.
I hope this fixes #26223.
This commit is contained in:
@@ -407,7 +407,7 @@ MainWidget *MainWindow::sessionContent() const {
|
||||
return _main.data();
|
||||
}
|
||||
|
||||
void MainWindow::showBoxOrLayer(
|
||||
void MainWindow::showOrHideBoxOrLayer(
|
||||
std::variant<
|
||||
v::null_t,
|
||||
object_ptr<Ui::BoxContent>,
|
||||
@@ -419,7 +419,7 @@ void MainWindow::showBoxOrLayer(
|
||||
if (auto layerWidget = std::get_if<UniqueLayer>(&layer)) {
|
||||
ensureLayerCreated();
|
||||
_layer->showLayer(std::move(*layerWidget), options, animated);
|
||||
} else if (auto box = std::get_if<ObjectBox>(&layer); *box != nullptr) {
|
||||
} else if (auto box = std::get_if<ObjectBox>(&layer)) {
|
||||
ensureLayerCreated();
|
||||
_layer->showBox(std::move(*box), options, animated);
|
||||
} else {
|
||||
@@ -435,20 +435,6 @@ void MainWindow::showBoxOrLayer(
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::ui_showBox(
|
||||
object_ptr<Ui::BoxContent> box,
|
||||
Ui::LayerOptions options,
|
||||
anim::type animated) {
|
||||
showBoxOrLayer(std::move(box), options, animated);
|
||||
}
|
||||
|
||||
void MainWindow::showLayer(
|
||||
std::unique_ptr<Ui::LayerWidget> &&layer,
|
||||
Ui::LayerOptions options,
|
||||
anim::type animated) {
|
||||
showBoxOrLayer(std::move(layer), options, animated);
|
||||
}
|
||||
|
||||
bool MainWindow::ui_isLayerShown() const {
|
||||
return _layer != nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user