mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 23:25:15 +00:00
Replace App::self() with Auth().user().
Always have self Auth().user() when AuthSession exists.
This commit is contained in:
@@ -478,17 +478,18 @@ void Navigation::showPeerInfo(
|
||||
void Navigation::showSettings(
|
||||
Settings::Type type,
|
||||
const SectionShow ¶ms) {
|
||||
const auto self = App::self();
|
||||
if (!self) {
|
||||
if (AuthSession::Exists()) {
|
||||
showSection(
|
||||
Info::Memento(
|
||||
Info::Settings::Tag{ Auth().user() },
|
||||
Info::Section(type)),
|
||||
params);
|
||||
} else {
|
||||
// #TODO settings
|
||||
App::wnd()->showSpecialLayer(
|
||||
Box<OldSettings::Widget>(),
|
||||
params.animated);
|
||||
return;
|
||||
}
|
||||
showSection(
|
||||
Info::Memento(Info::Settings::Tag{ self }, Info::Section(type)),
|
||||
params);
|
||||
}
|
||||
|
||||
void Navigation::showSettings(const SectionShow ¶ms) {
|
||||
|
Reference in New Issue
Block a user