mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
refactored layer methods
This commit is contained in:
@@ -66,18 +66,6 @@ namespace App {
|
||||
if (Window *win = wnd()) win->showSettings();
|
||||
}
|
||||
|
||||
void showLayer(LayeredWidget *widget, bool forceFast) {
|
||||
if (Window *w = wnd()) w->showLayer(widget, forceFast);
|
||||
}
|
||||
|
||||
void replaceLayer(LayeredWidget *widget) {
|
||||
if (Window *w = wnd()) w->replaceLayer(widget);
|
||||
}
|
||||
|
||||
void showLayerLast(LayeredWidget *widget) {
|
||||
if (Window *w = wnd()) w->showLayerLast(widget);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace Ui {
|
||||
@@ -90,6 +78,19 @@ namespace Ui {
|
||||
if (MainWidget *m = App::main()) m->ui_hideStickerPreview();
|
||||
}
|
||||
|
||||
void showLayer(LayeredWidget *box, ShowLayerOptions options) {
|
||||
if (Window *w = App::wnd()) w->ui_showLayer(box, options);
|
||||
}
|
||||
|
||||
void hideLayer(bool fast) {
|
||||
if (Window *w = App::wnd()) w->ui_showLayer(0, ShowLayerOptions(CloseOtherLayers) | (fast ? ForceFastShowLayer : AnimatedShowLayer));
|
||||
}
|
||||
|
||||
bool isLayerShown() {
|
||||
if (Window *w = App::wnd()) return w->ui_isLayerShown();
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace Notify {
|
||||
|
Reference in New Issue
Block a user