mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
Support all Settings links
This commit is contained in:
parent
62516e264d
commit
300cc3dbca
1 changed files with 11 additions and 6 deletions
|
@ -444,6 +444,7 @@ bool ResolveSettings(
|
|||
}
|
||||
controller->window().activate();
|
||||
const auto section = match->captured(1).mid(1).toLower();
|
||||
auto type = ::Settings::Main::Id();
|
||||
if (section.isEmpty()) {
|
||||
controller->window().showSettings();
|
||||
return true;
|
||||
|
@ -452,12 +453,16 @@ bool ResolveSettings(
|
|||
return true;
|
||||
} else if (section == qstr("devices")) {
|
||||
controller->session().api().authorizations().reload();
|
||||
type = ::Settings::Sessions::Id();
|
||||
} else if (section == qstr("folders")) {
|
||||
type = ::Settings::Folders::Id();
|
||||
} else if (section == qstr("privacy")) {
|
||||
type = ::Settings::PrivacySecurity::Id();
|
||||
} else if (section == qstr("themes")) {
|
||||
type = ::Settings::Chat::Id();
|
||||
} else if (section == qstr("change_number")) {
|
||||
type = ::Settings::ChangePhone::Id();
|
||||
}
|
||||
const auto type = (section == qstr("folders"))
|
||||
? ::Settings::Folders::Id()
|
||||
: (section == qstr("devices"))
|
||||
? ::Settings::Sessions::Id()
|
||||
: ::Settings::Main::Id();
|
||||
controller->showSettings(type);
|
||||
controller->window().activate();
|
||||
return true;
|
||||
|
@ -760,7 +765,7 @@ const std::vector<LocalUrlHandler> &LocalUrlHandlers() {
|
|||
ResolvePrivatePost
|
||||
},
|
||||
{
|
||||
qsl("^settings(/folders|/devices|/language)?$"),
|
||||
qsl("^settings(/language|/devices|/folders|/privacy|/themes|/change_number)?$"),
|
||||
ResolveSettings
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue