mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-03 16:05:57 +00:00
Added ability to prevent application lock and account switch.
This commit is contained in:
@@ -1897,10 +1897,8 @@ bool MainWidget::stackIsEmpty() const {
|
||||
return _stack.empty();
|
||||
}
|
||||
|
||||
bool MainWidget::preventsCloseSection(
|
||||
Fn<void()> callback,
|
||||
const SectionShow ¶ms) const {
|
||||
if (params.thirdColumn || Core::App().passcodeLocked()) {
|
||||
bool MainWidget::preventsCloseSection(Fn<void()> callback) const {
|
||||
if (Core::App().passcodeLocked()) {
|
||||
return false;
|
||||
}
|
||||
auto copy = callback;
|
||||
@@ -1908,6 +1906,14 @@ bool MainWidget::preventsCloseSection(
|
||||
|| (_history && _history->preventsClose(std::move(callback)));
|
||||
}
|
||||
|
||||
bool MainWidget::preventsCloseSection(
|
||||
Fn<void()> callback,
|
||||
const SectionShow ¶ms) const {
|
||||
return params.thirdColumn
|
||||
? false
|
||||
: preventsCloseSection(std::move(callback));
|
||||
}
|
||||
|
||||
void MainWidget::showBackFromStack(
|
||||
const SectionShow ¶ms) {
|
||||
|
||||
|
Reference in New Issue
Block a user