mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +02:00
Added auto clean of top bar in dialogs on empty.
This commit is contained in:
parent
f3b6c7c09b
commit
98d9357208
2 changed files with 7 additions and 0 deletions
|
@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
*/
|
||||
#include "dialogs/dialogs_top_bar_suggestion.h"
|
||||
|
||||
#include "base/call_delayed.h"
|
||||
#include "core/application.h"
|
||||
#include "core/click_handler_types.h"
|
||||
#include "data/data_birthday.h"
|
||||
|
@ -87,6 +88,9 @@ object_ptr<Ui::SlideWrap<Ui::RpWidget>> CreateTopBarSuggestion(
|
|||
wrap->toggle(true, anim::type::normal);
|
||||
} else {
|
||||
wrap->toggle(false, anim::type::normal);
|
||||
base::call_delayed(st::slideWrapDuration * 2, wrap, [=] {
|
||||
delete wrap;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -383,6 +383,9 @@ Widget::Widget(
|
|||
_topBarSuggestion = innerList->add(CreateTopBarSuggestion(
|
||||
innerList,
|
||||
&session()));
|
||||
_topBarSuggestion->lifetime().add([=] {
|
||||
_topBarSuggestion = nullptr;
|
||||
});
|
||||
rpl::combine(
|
||||
_topBarSuggestion->entity()->desiredHeightValue(),
|
||||
_childListShown.value()
|
||||
|
|
Loading…
Add table
Reference in a new issue